MuleSoft Accelerator for Salesforce Service Cloud icon

MuleSoft Accelerator for Salesforce Service Cloud

(0 reviews)

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

sfc-sc-update-issue-api-led-architecture.png

Workflow

  1. Trigger an event from ServiceNow/Jira when there is an update to the incident/issue
  2. Mule consumes the event and pulls the update record from ServiceNow/Jira
  3. Mule calls the Salesforce System API to synchronize the updates on the Service Cloud case.

Sequence diagrams

Jira issue

sfc-sc-update-issue-jira-seq-diagram.png

ServiceNow incident

sfc-sc-update-issue-servicenow-seq-diagram.png

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 NameField LabelData TypeDescription
External_Comments__cExternal CommentsLong Textarea(131,072)Comments added on the incident/ticket in ServiceNow/Jira
External_Status__cExternal StatusText(20)Status of the incident/ticket in ServiceNow/Jira
External_System_Last_Updated__cExternal System Last UpdatedDateDate last updated in ServiceNow/Jira
External_Owner__cExternal OwnerText(50)Incident/ticket owner in ServiceNow/Jira
External_Priority__cExternal PriorityText(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.

  1. ServiceNow Experience API | API Specification | Implementation Template
  2. Case Listener | Implementation Template
  3. Case Process API | API Specification | Implementation Template
  4. Salesforce System API | API Specification | Implementation Template

Setup instructions (Service Cloud <- Jira)

Jira configuration

  1. Follow the Jira Configuration from section Use Case 2 - Create issues or incidents before proceeding further.
  2. 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
  3. Log in to Jira using an account with permission to create webhooks.
  4. Navigate to settings > system > Advanced > WebHooks.
  5. Click the Create a Webhook button and enter the following details in the create form:
FieldDescription
NameSFDC Case
StatusEnabled
URLhttps://{hostname}/api/issue-updates
DescriptionThis webhook is used to post issue and comment updates to Salesforce
EventsAll Issues-Issue-select updated
Comments-select created,updated,deleted
  1. Leave the default values for the remaining configuration items.
  2. Click the Create button to create the webhook.
  3. 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.

  1. Jira System API | API Specification | Implementation Template
  2. Case Listener | Implementation Template
  3. Case Process API | API Specification | Implementation Template
  4. Salesforce System API | API Specification | Implementation Template
  5. 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 NameSFDC Field LabelData TypeDescription
External_Comments__cExternal CommentsLong Textarea(131,072)Comments added on the incident/ticket in ServiceNow/Jira
External_Status__cExternal StatusText(20)Status of the incident/ticket in ServiceNow/Jira
External_System_Last_Updated__cExternal System Last UpdatedDateDate last updated in ServiceNow/Jira
External_Owner__cExternal OwnerText(50)Incident/ticket owner in ServiceNow/Jira
External_Priority__cExternal PriorityText(50)Incident/ticket priority in ServiceNow/Jira

Data elements & mapping

SFDC Field NameServiceNow Data Elements (UI field)Jira Data Elements(UI field)
External_Comments__ccomments (Comments)comments (Comments)
External_Status__cstate(State)status (status)
External_System_Last_Updated__cGenerated in ServiceNowStatuscategorychangedate (NA)
External_Owner__copened_by(Opened by)creator(NA)
External_Priority__cpriority(Priority)priority(Priority)

Reviews

TypeCustom
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onJun 25, 2021
Asset overview

Asset versions for 1.5.x

Asset versions
VersionActions
1.5.1