MuleSoft Accelerator for Salesforce Service Cloud
Use case 3 - Updates to issues or incidents
Overview
The following use case is covered:
- Updates to issues or incidents [Service Cloud <- ServiceNow (a) & Jira (b)]
This use case shows you how updates that occur to an "incident" in ServiceNow or an "issue" in Jira (e.g., comments or changes to the status field) are synchronized with the corresponding Service Cloud "case".
High-level architecture
Workflow
- Trigger an event from ServiceNow/Jira when there is an update to the incident/issue
- Mule consumes the event and pulls the update record from ServiceNow/Jira
- Mule calls the Salesforce System API to synchronize the updates on the Service Cloud case.
Sequence diagrams
Jira issue
ServiceNow incident
Systems involved
- Jira: source of product-related tickets
- ServiceNow: source of internal-related tickets
- Service Cloud
Setup instructions (Service Cloud <- ServiceNow)
ServiceNow configuration
Refer to the README.md in the common build project asset (look under the configs
folder).
Service Cloud configuration
Create custom fields on the Case object to represent field values from external systems.
Field Name | Field Label | Data Type | Description |
---|---|---|---|
External_Comments__c | External Comments | Long Textarea(131,072) | Comments added on the incident/ticket in ServiceNow/Jira |
External_Status__c | External Status | Text(20) | Status of the incident/ticket in ServiceNow/Jira |
External_System_Last_Updated__c | External System Last Updated | Date | Date last updated in ServiceNow/Jira |
External_Owner__c | External Owner | Text(50) | Incident/ticket owner in ServiceNow/Jira |
External_Priority__c | External Priority | Text(50) | Incident/ticket priority in ServiceNow/Jira |
Mule projects
Follow the README instructions in the following Mule template projects to set up, deploy, and run these projects. All configurable properties can be found in the YAML files in each project.
- ServiceNow Experience API | API Specification | Implementation Template
- Case Listener | Implementation Template
- Case Process API | API Specification | Implementation Template
- Salesforce System API | API Specification | Implementation Template
Setup instructions (Service Cloud <- Jira)
Jira configuration
- Follow the Jira Configuration from section Use Case 2 - Create issues or incidents before proceeding further.
- Update the created custom-field internal reference in jira-query-issue-response.dwl under "Jira System API".
- Use the following field name format:
customfield\_10027
- This value will change based on the number of custom fields created previously in Jira
- Configure WebHooks to receive issue updates from Jira
- Use the following field name format:
- Log in to Jira using an account with permission to create webhooks.
- Navigate to settings > system > Advanced > WebHooks.
- Click the Create a Webhook button and enter the following details in the create form:
Field | Description |
---|---|
Name | SFDC Case |
Status | Enabled |
URL | https://{hostname}/api/issue-updates |
Description | This webhook is used to post issue and comment updates to Salesforce |
Events | All Issues-Issue-select updated Comments-select created,updated,deleted |
- Leave the default values for the remaining configuration items.
- Click the Create button to create the webhook.
- To validate the configuration, alter the status or add a comment to an issue.
- The proper function will trigger an update call to the API endpoint.
- Check the logs of the API to confirm the configuration.
Mule projects
Follow the readme instructions under each of the below components to setup and configure. All configurable properties can be found in the YAML files in each project.
- Jira System API | API Specification | Implementation Template
- Case Listener | Implementation Template
- Case Process API | API Specification | Implementation Template
- Salesforce System API | API Specification | Implementation Template
- Jira Experience API | API Specification | Implementation Template
Service Cloud components & configurations
Create custom fields on the Case object to represent field values from external systems.
SFDC Field Name | SFDC Field Label | Data Type | Description |
---|---|---|---|
External_Comments__c | External Comments | Long Textarea(131,072) | Comments added on the incident/ticket in ServiceNow/Jira |
External_Status__c | External Status | Text(20) | Status of the incident/ticket in ServiceNow/Jira |
External_System_Last_Updated__c | External System Last Updated | Date | Date last updated in ServiceNow/Jira |
External_Owner__c | External Owner | Text(50) | Incident/ticket owner in ServiceNow/Jira |
External_Priority__c | External Priority | Text(50) | Incident/ticket priority in ServiceNow/Jira |
Data elements & mapping
SFDC Field Name | ServiceNow Data Elements (UI field) | Jira Data Elements(UI field) |
---|---|---|
External_Comments__c | comments (Comments) | comments (Comments) |
External_Status__c | state(State) | status (status) |
External_System_Last_Updated__c | Generated in ServiceNow | Statuscategorychangedate (NA) |
External_Owner__c | opened_by(Opened by) | creator(NA) |
External_Priority__c | priority(Priority) | priority(Priority) |