All Collections
Integrations
Salesforce
Connecting Salesforce & Juro: Two-way sync for custom object fields
Connecting Salesforce & Juro: Two-way sync for custom object fields

Using Flows to enable a two-way sync on non-standard Salesforce objects

Sharen Gill avatar
Written by Sharen Gill
Updated over a week ago

Introduction πŸ‘‹


Juro's Salesforce integration allows a two-way sync on the Account, Opportunity, User and Contract fields. Additionally, it's possible to set up a two-way sync on additional object fields within a custom flow.
​

The are two steps for this setup:

  1. Creating a Lightning Flow to capture data changes and pass them to the Juro Contract object

  2. Administering Custom Metadata Type records to whitelist objects for Juro Template validation.

Let's get started!
​
πŸ’‘ NB: Juro's Negotiation flow cannot be activated for any contracts generated from Salesforce.


Step 1️⃣ Creating the Lightning Flow 🌩️


The below steps will create a flow to retrieve the custom object field data and initialise the sync job. These can be followed for Salesforce standard and custom objects.
​
To see a video of an example flow where we set it up for the Salesforce Order object, click here. To start the setup from the Salesforce Setup portal:

  1. Under the Process Automation heading, select Flows, and then New Flow

  2. Select the Record-Triggered Flow type:

  3. Select the required object (Order, in the below example)

  4. Select to trigger the Flow when β€˜A record is updated’

  5. Optimise the flow for Actions and Related Records

  6. Click Done

  7. Click the + icon in the Record-Triggered Flow chain

  8. In the Add Element menu, select Action

In the New Action menu that opens, type β€œapex” to find and select initialize sync job.


Step 2️⃣ Setting up the action πŸ‹οΈ


To set up the action:

  1. Populate the Label field

  2. Under Select Objects, select the object (Order, in our example) for both inputs ('newSObject' and 'oldSObject')

  3. Under Set Input Values, add the values from the dropdown menu for both inputs ( {!$Record} and {!$Record__Prior} respectively

  4. Click Done

  5. In the Save the Flow window that appears, add a Label and API Name for the new Flow: the API Name is needed in the next step during the Custom Metadata Type record creation

  6. Click Save.


Step 3️⃣ Creating the Custom Metadata Type record πŸ¦„


The following steps will enable a two-way (or outbound) sync for the chosen Object (Order, in our example).
​
To do this, from the Salesforce Setup portal:

  1. Go to the Custom Codes section in the Salesforce Setup page and select Custom Metadata Types to find the existing record JUROTwoWaySyncObjects.

    Then, select Manage Records next to this item

  2. Click New

  3. Select the object name from the dropdown picklist and input the API name from the previous step.


    β€‹πŸ’‘ NOTE: if the Flow was not activated, an error will be shown here. If this happens, please activate the flow and retry this step

  4. Save the Record.


Step 4️⃣ : Testing the synchronisation πŸ›°οΈ


The object selected for the above steps must be reachable from JUROContract by lookups for mapping. E.g. The JUROContract object has a lookup to the Opportunity, thus, Opportunity fields are shown within the path builder. JUROContract will require a lookup to the necessary object in order to expose the fields for mapping within the path builder.

You can then map fields using the path builder, selecting the path parent to child object/field and clicking Save. The path will be submitted and the synchronisation type can be set within the respective column.

If the above steps are not followed for the required object, the below error will show:

If the setup is successful, the mapping and sync type will be saved:


πŸ’β€β™€οΈ As always, our Support Team is happy to help you with anything further if needed. Start a chat with us right here by clicking the Intercom button in the bottom-right-hand corner of this page.

Alternatively, you can email your query to support@juro.com πŸš€


Did this answer your question?