Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Sync Statuses & Custom Fields (Select List) Between Salesforce and Jira

To sync statuses and custom fields between Jira and Salesforce, you need a third-party integration solution.

I’ll show you how to implement this use case with Exalate.

 

Jira to Salesforce Use Case: Custom Field Update and Status Sync

Selecting an account name for a custom drop-down field in a Jira issue triggers a sync with the corresponding Salesforce case entity. 

At the same time, changing the status of your Jira issue will also update the status of the corresponding Salesforce Case. 

Sounds complicated, right? Let me show you the requirements and challenges:

Primary Requirements

When a team member picks a user from the drop-down list, the selected option appears as a text value on a custom field on the Salesforce side. 

For this to work, you’d need to establish sync rules to control the incoming and outgoing data in custom fields. These rules are single lines of code.

You can also set triggers to update the field on both the Jira and Salesforce instances automatically and bi-directionally.

Potential Challenges

  • Mapping the right fields and entities using the field name or API name.
  • Setting up the right trigger to control the synchronization.
  • Getting the sync to continue after a network timeout.
  • Avoiding mistakes when writing the sync rules.
  • Getting accurate data from either side.

 

How Exalate Can Solve the Problem

Exalate is a two-way integration solution that works with Zendesk, Azure DevOps, ServiceNow, Jira, Salesforce, etc. 

  • You can use it to sync Salesforce and Jira custom fields as well as several other entities.
  • The Bulk Exalate feature allows you to create a trigger for syncing existing issues.
  • Exalate’s Groovy scripting engine is apt for configuring complex use cases.
  • Exalate allows you to limit what goes in or comes out of your system.

How to Implement Exalate for Data Updates

First, install Exalate on both the Salesforce and Jira sides. Next, follow the instructions in this comprehensive guide to establish a connection between them.

For advanced use cases such as this, you must set up a connection using Exalate’s Script Mode. After that, you can commence with the sync.

Go to your Jira dashboard and create a new issue.

Then, open the Exalate console in Jira. Go to the connection you want to edit and click on the “Edit connection” icon. 

Then change the sync rules under the “Rules” tab. 

You have two text boxes: 

  • Outgoing sync (on the Jira side) refers to the data to be sent over to the Salesforce side. 
  • Incoming sync (on the Salesforce side) refers to the data to be received from the issue on Jira.

The same logic applies to incoming and outgoing in the other direction.

image5.png

Under the “Rules” tab, enter the following code snippet into the Jira “Outgoing sync” text box. 

replica.customFields."SF Contact" = issue.customFields."SF Contact"

Note: The issue.customFields function points to the custom field name within the Jira issue. The replica works as a payload or a message. It contains information you want to pass between the two systems.

image4.png

In the Jira “Incoming sync” text box, enter the following snippet:

def statusMapping = ["New":"To Do", "Working":"In Progress","Escalated":"Done"]
def remoteStatusName = replica.Status.value
issue.setStatus(statusMapping[remoteStatusName] ?: remoteStatusName)

Note: The statusMapping variable establishes the relationship between statuses. The remoteStatusName maps to the replica’s status. Eg., A “New” case on Salesforce appears as “To Do” in Jira.

Once done, click “Publish” to save the changes.

On the Salesforce side, enter the code in the “Incoming sync” text box.

image3.png

 

def statusMap = [
       "New":"To Do",
       "In Progress": "Working",
       "Done": "Escalated"
  ]
def remoteStatusName = replica.status.name
statusName = statusMap[remoteStatusName] ?: remoteStatusName
entity.Status = statusName

entity."Jira_custom_field__c" = replica.customFields."SF Contact".value.value

Note: The statusMap variable establishes the relationship between statuses. The remoteStatusName maps to the replica’s status name. Eg., An “Escalated” case on Salesforce appears as “Done” in Jira. The entity."Jira_custom_field__c" function points to the custom field “Jira custom field” within Salesforce. The replica contains information you want to pass between the two systems

Once done, click “Publish” to save the changes.

Now go back to the Jira issue and choose a user from the “SF Contact” drop-down list. Then change the status to “Done”.

image1.png

Back on Salesforce, you will see the account name appear in the “Jira custom field” automatically.

image2.png

Congratulations! You have now set rules to help you update and sync custom Jira fields to Salesforce. 

If you still have questions or want to see how Exalate is tailored to your specific use case, book a demo with one of our experts right away

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events