Skip to main content
All CollectionsIntegrationsSalesforce
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 3 months ago

Contents πŸš€



Introduction πŸ‘‹


Our Salesforce integration allows a two-way sync with the Account, Opportunity, User, and Contact fields. Additionally, you can set up a two-way sync on additional object fields within a custom flow.

πŸ’‘ NOTE: The Negotiation flow can now be activated for any contracts generated from Salesforce! For more information, please click here.

There are just three steps to set up a two-way sync:
​


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. This 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:

1. Go to the Salesforce Setup portal:
​

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

3. The Flow Builder will open in a new tab. From here, select Start from scratch and click Next.
​

4. In the Select type menu, choose Record-Triggered Flow and click Create.
​

4. In the Object field, search for and select the required object. Then, set your trigger action.
​

5. Optimise the flow for Actions and Related Records and click Save.
​

6. Give your custom flow a label and click Save.
​

7. Click the + icon in the Record-Triggered Flow chain (this will appear when you hover over the flow). In the Add Element dropdown, select Action.
​

8. In the Search Action menus, type β€œapex” to find and select initialize sync job.

That's the first step complete! Now it's time to set up the action.


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


To set up the action:

1. Populate the below fields as follows:

  • Label: your reference for this action (this will automatically populate the API Name field; we advise copying this as it is needed in the next step).

  • Select Objects: select the object (Order, in our example) for both inputs (newSObject and oldSObject)

  • Set Input Values: in the newSObject field, select Triggering Order {!$Record}. In the oldSObject field, select Prior Values of Triggering Order {!$Record__Prior}



2. 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.


Next to this label, click Manage Records.

2. Click New.

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

Finally, click Save.

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


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 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?