Examine an Integration Use Case
After completing this unit, you’ll be able to:
- Describe the challenge of keeping leads in Google Sheets in sync with leads in Salesforce and notifications in Slack.
- Explain how to use MuleSoft Composer to sync leads in Google Sheets with leads 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 marketing team at NTO collects leads from marketing events using Google Sheets. For best customer relationship management, the team manages and maintains all leads in Sales Cloud. To improve lead management and foster team collaboration, the team also notifies the sales-leads channel about new leads in Slack.
Currently, the marketing team performs these tasks manually. Every time there’s a new lead, the team adds the lead to the Marketing Leads spreadsheet in Google Sheets. Then, they check if a corresponding lead exists in the NTO org’s Sales Cloud. If not, they create a corresponding lead in Sales Cloud, and then send a message with relevant lead details to the sales-leads channel in Slack. This process is time-consuming and highly error-prone, so the team wants to automate it.
As a solution, you need to automate the integration between Google Sheets, Sales Cloud, 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 of leads in Google Sheets with leads in Sales Cloud and notifications in Slack. Specifically, the flow must perform the following tasks.
- Find any new lead in the Marketing Leads spreadsheet in Google Sheets.
- Determine if a corresponding lead exists in Sales Cloud.
- If the lead doesn’t exist:
- Create a corresponding lead in Sales Cloud.
- Send a message with relevant lead details to the sales-leads channel in Slack.
To implement the solution using MuleSoft Composer, you 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 Sales 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 with testing, run the flows using your production systems and data.
Next, you learn about the prerequisites for your Google Sheets, Salesforce, and Slack environments.
Prerequisites for the Google Sheets Environment
It’s assumed that you have a Google account that allows you to access everything Google including Google Sheets. If you don’t have a Google account, sign up for a free account.
When you create a connection to Google Sheets using MuleSoft Composer, you’re prompted to grant MuleSoft Composer permissions to your Google account. Be ready to grant MuleSoft Composer the following permissions.
- See and download all your Google Drive files.
- See information about your Google Drive files.
- See, edit, create, and delete all your Google Sheets spreadsheets.
Finally, ensure the Marketing Leads spreadsheet has a header row. You can name the column headers whatever you want. As a best practice, give the column headers names that match the fields of the Lead object in Sales Cloud whose data you want to sync with.
For example, suppose you want to sync the fields First Name, Last Name, Email, Phone, Company, Country, Industry, and Lead Source from Google Sheets with their corresponding fields in the Lead object in Sales Cloud. Then, your Marketing Leads spreadsheet should look like this.
When your flow executes, the Google Sheets connector writes to the first available row in the spreadsheet; in this case, row 2.
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.
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.
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.
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 to create a test Slack workspace and channel.
- 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.
sales-leadsas the project your team is working on, and click Next; sales-leads 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 and test your flow.