Examine an Integration Use Case
After completing this unit, you’ll be able to:
- Describe the challenge of keeping incidents in ServiceNow in sync with cases in Salesforce and notifications in Slack.
- Explain how to use MuleSoft Composer to sync incidents in ServiceNow with cases in Salesforce and notifications in Slack.
- Prepare to create a flow.
Before You Start
This module builds on MuleSoft Composer Installation and Configuration, so make sure you've completed it before you continue. Recall from that module, you need to have the MuleSoft Composer User permission set if you want to build and run integration flows.
In this module, we assume you’re an authorized MuleSoft Composer user. If you’re not a MuleSoft Composer user, that’s OK. Read along to learn how they perform the steps. Don’t try to follow the steps in a Trailhead Playground, because MuleSoft Composer isn't available in the Trailhead Playground.
In this unit, you step into the role of admin for Northern Trail Outfitters (NTO), an outdoor and recreational gear retailer. First, you examine an integration challenge faced by NTO, and then you learn about a MuleSoft Composer integration solution. Finally, you learn how to prepare to create your flow.
Let’s take a look at an integration challenge NTO is facing. Your IT team at NTO uses ServiceNow to manage and maintain incidents reported by customers, partners, and employees. Your customer support team manages and maintains customer service cases in the NTO org’s Service Cloud. To improve service case management and foster team collaboration, both teams need to have immediate visibility into critical customer data about product issues to diagnose and resolve incidents.
Currently, the two teams perform these tasks manually. Every time there’s an incident, the IT team creates or updates the incident in ServiceNow. Then they send an email with relevant incident details to the customer support team. The customer support team, in turn, determines if the incident exists as a case in Service Cloud.
If a corresponding case doesn’t exist, the team creates a case with relevant incident details in Service Cloud. For cross-referencing purposes, the customer support team also lets the IT team know the Salesforce Case ID associated with the incident. The IT team then updates the incident with the Salesforce Case ID. The customer support team then notifies the service-cases channel in Slack.
If a corresponding case exists, the customer support team updates it, and then notifies the service-cases channel in Slack.
This process is time-consuming and highly error-prone, so the teams want to automate it.
As a solution, you need to automate the integration between ServiceNow, Salesforce, and Slack to achieve near real-time integration. To do this, you use MuleSoft Composer to create an integration flow that automatically syncs the creation or update of incidents in ServiceNow with cases in Salesforce and notifications in Slack. Specifically, the flow must perform the following tasks.
- Find any new or updated incident in ServiceNow.
- Determine if a corresponding case exists in Service Cloud.
- If a corresponding case doesn’t exist:
- Create a case with relevant incident details in Service Cloud.
- Update the incident with the Salesforce Case ID in ServiceNow.
- Notify the service-cases channel about the new case in Slack.
- If a corresponding case exists:
- Update the case with relevant incident details in Service Cloud.
- Notify the service-cases channel about the updated case in Slack.
To implement the solution using MuleSoft Composer, you need to perform these flow creation tasks.
- Prepare to create a flow.
- Design and test a flow.
- Activate a flow.
- Monitor and troubleshoot a flow.
You learn how to perform these tasks in the rest of this module.
Prepare to Create a Flow
Ready to get started?
First, gather all required information about the systems and assets your flow is going to use. The following table describes the systems the flow needs to connect to and the information you need for those systems.
NTO’s Service Cloud
As a best practice, use a test environment for these systems and data when you design and test your flows. After you’re done testing, run the flows using your production systems and data.
Next, you learn about the prerequisites for your ServiceNow, Salesforce, and Slack environments.
Prerequisites for the ServiceNow Environment
First, it’s assumed that you have a ServiceNow instance. Follow these steps to start your ServiceNow instance.
- Access the ServiceNow Developer Site.
- Click Sign In.
- Enter your email address and click Next.
- Enter your password and click Sign in.
- Click Start Building. ServiceNow launches the instance in a new tab.
Next, you must look up the instance URL and the username and password associated with the instance, so you can configure a connection to ServiceNow using MuleSoft Composer later. Follow these steps.
- In the first ServiceNow window, click your username icon. Information about the instance is displayed.
- Click Manage instance password.
- Copy the instance URL, username, and password into a text file of your choice. You’ll use these values to configure a ServiceNow connection using MuleSoft Composer later.
Note: The username you use to configure a ServiceNow connection in MuleSoft Composer is admin. It’s not the username you use to log in to ServiceNow.
If you don’t have a ServiceNow instance, you can sign up for a free, full-featured ServiceNow Personal Developer Instance (PDI). Follow these steps.
- Access the ServiceNow Developer Site.
- Click Sign up and Start Building.
- Enter your first name, last name, email address, and password.
- Access the email sent by ServiceNow and then click Verify Email.
- Enter your email address and password to sign in to ServiceNow.
- In the Getting Started dialog box, click Yes to get a developer-oriented IDE.
- Copy the instance URL, username, and password into a text file of your choice. You’ll use these values to configure a ServiceNow connection, using MuleSoft Composer later.
Note: ServiceNow also sends you a separate email containing the same instance URL, username, and password.
- Click Open Instance. Your ServiceNow instance is displayed.
Finally, to capture the Salesforce Case ID for each incident, you must create a text custom field called Salesforce Case ID for the Incidents form by using the Incidents module in ServiceNow. Follow these steps.
- In the Application Navigator, click the Incidents module.
- Click the out-of-the-box incident INC0010111. The Incidents form is displayed.
- Click the hamburger icon next to the incident name, and then select Configure | Form Layout. The Configuring Incident form opens.
- Create a new field with the following values.
Salesforce Case ID
- Field length:
- Click Add, click Save, and then click Close.
- Click the hamburger icon next to the incident name again, and then select Configure | Form Design. The Form Design opens in a new tab.
- Drag Salesforce Case ID up to below Watch list, click Save, and then click Close.
- Go back to the Incident form tab. You should see the custom field Salesforce Case ID below the Watch list field.
Note: It’s important that your ServiceNow instance be up and running when you design and build flows to integrate using MuleSoft Composer. If it’s not running, start up the instance before designing your flows.
Prerequisites for the Salesforce Environment
It’s assumed that you have a sandbox org and a production org to build and run flows that sync with Salesforce.
Note: If you don’t have a sandbox org to design and test your flows, you can use a developer org.
Follow these steps to sign up for a free developer org:
- Go to https://developer.salesforce.com/signup.
- Enter your contact information.
- Enter a unique username.
- Click Sign me up, and wait for your welcome email.
- In the welcome email, click the link to set your password.
To capture the ServiceNow incident ID for the Case object, you must ensure that a text custom field called ServiceNow Incident ID is created for the Case object in the NTO org. Here’s an example of ServiceNow Incident ID for Case in the NTO org.
To learn how to create custom fields, see Customize a Salesforce Object.
Finally, when you create a connection to Salesforce using MuleSoft Composer, you’re prompted to grant MuleSoft Composer permissions. Ensure your Salesforce accounts for both your sandbox and production orgs are ready to grant MuleSoft Composer the following permissions.
- Access the identity URL service.
- Manage user data via APIs.
- Perform requests at any time.
Prerequisites for the Slack Environment
To send notifications about leads to a predefined Slack channel, you need a Slack workspace and channel. Follow these steps.
- Access slack.com, click LAUNCH SLACK, and then select Create a new workspace.
- Enter your email address and click Continue.
- Check your email for a confirmation code sent by Slack and enter it in Slack.
NTOas the name of your company, and click Next. NTO is your workspace.
service-casesas the project your team is working on, and click Next; service-cases is your channel.
- When prompted to add people, click Skip this step, click Skip Step, and then click Let’s Go to go straight to your workspace and channel.
Finally, when you create a connection to Slack using MuleSoft Composer, you’re prompted to grant MuleSoft Composer permissions. Be ready to grant MuleSoft Composer the following permissions to your Slack workspace.
- View content and info about channels and conversations.
- View content and info about your workspace.
- Perform actions in channels and conversations.
You’ve taken the first steps to prepare to create your flow with MuleSoft Composer. In the next unit, you learn how to design your flow.