Cisco Webex Experience Management integration with Salesforce using Microsoft Azure Logic Apps
Content Outline
Salesforce has published its Standard connectors in Logic Apps. The details regarding the Salesforce connector on Logic Apps are available here. Also, our view on Microsoft Azure Logic Apps and how we use the same are detailed here
1. Use cases
Integrations between the two systems are quite a broad topic. It is important to narrow down on the use cases that we want to accomplish by integrating two systems. The standard use cases that we have identified for integration between Experience Management and Salesforce are as given below:
-
Use case 1: Send real-time Experience Management surveys based on state changes of entities under various objects in Salesforce. Here are a couple of examples of this use case:
a. When the Ticket status changes from “Any” to “Closed”, send a post ticket closure survey to the customer
b. When the status of Lead changes from “Prospect” to “client”, send a Sales experience survey to the customer
-
Use case 2: Collect feedback with Experience Management and raise tickets on Salesforce basis notifications set on Experience Management
-
Use case 3: Updates made on the Salesforce ticket to add a note in the corresponding Experience Management survey response
This video demonstration will walk you through a few usecases in a Salesforce integration with WXM.
**We will walk through an account set up for an automobile service and repair company, Salesforce Integration For Experience Management, illustrating the scenario of an inactive customer in Salesforce.
2. Setting up the integration
Experience management has created Logic App workflows that satisfy the standard use cases mentioned here. We have published a Logic App for each use case as a JSON here. Logic App provides the flexibility to import such published Logic Apps into any other Azure account.
Just follow the steps below to set up the Salesforce integration in your Azure Logic Apps subscription.
2.1 Importing a ready Logic App into your Azure Logic Apps subscription
- Login to you Microsoft Azure account and navigate to the Logic Apps section
- Click on Add
- Select your Azure Subscription and resource group from the drop down.
- Fill in a Logic App user name.
- Also select the Azure region in which you want to deploy the Logic App.
- Click on “Review + Create” once done
- Choose Blank Logic App on the next page that appears
- Copy the content (JSON) of the Logic App that we have published for the specific use case from this link
- Select “Code View” and then paste the JSON here.
- Please modify the Connection details at this point to reflect your Subscription, Resource Group and Location.
-
Click Save and then click Run. Your Logic App is imported successfully.
-
The Logic App will now be listed under the Logic Apps page. You may search with the name of the app you created to quickly find it.
The next section will explain how to personalise the Logic App you just created to run for your Salesforce and Experience management account.
2.2. Configuring the Logic App to work with your Salesforce and Experience Management account
Once the Logic Apps is created by importing the JSON relevant to the integration use case you want to accomplish, you may now change some of the configurations in the Logic App. These changes are made so that the Logic App is configured to work with the customer’s Salesforce and Experience management account. Some common configuration changes you would like to make would be:
- Changing the Authentication details of Salesforce
- Changing the authentication details of Experience management
- Changing the Salesforce object and associated fields based on the use case you are trying to accomplish
We will look at each Use case and its corresponding Logic Apps and the configuration changes that are to be made.
Use case 1: Send real-time Experience Management surveys based on state changes in Salesforce
-
Click on the Logic App created in your Azure account (by importing the published JSON for Use case 1 as explained under Section 2.1)
-
Click on the “Logic App designer” menu item
- You will see the imported Logic App as shown in the image below
- Clicking on each step in the flow will expand the card to show the settings and configuration. The expanded view would be as seen in the image below.
-
At Step 1, all the records under the defined Salesforce object (Accounts or Contacts or Cases etc) that were modified are being pulled every 1 minute.
-
Based on the use case, please select the right object in the Salesforce connector. For example: If you are looking at sending a post ticket closure survey, then “Cases” object should be selected here.
-
You can change the frequency of look up at this point as well.
-
- Update the Salesforce authentication by clicking on “Change Connection” and then entering the client’s account credentials
-
At Step 2, the app is declaring the survey link variable. Leave this step as is
-
At Step 3, the app is identifying the Salesforce field status change, based on which the Experience management survey link is expected to be sent to the recipient.
- Modify the Experience management survey trigger condition at this step to suit your need. For example, for Post ticket closure survey, you would select “Status” and set condition to match “Closed” (or the appropriate value set in the Salesforce account)
- If the condition is met, then an Experience Management survey link will be created. Please change the prefill information and Authentication information adequately
-
Leave the “Parse JSON” and “Append to string variable” step as is. No changes are required here. The app is just parsing the Survey token creation API response from Experience management and identifying the survey token ID to create the survey link that has to be sent to the recipient.
-
Expand the “Send an email” step and change the email Body to suit your communication template needs. You may pick values from Salesforce and Experience management to fill the body such as Customer Name, Account name etc.
-
Please leave the survey link field in the email. If removed, there will be no survey link in the email that goes to the customer.
-
Select the Customer Email ID field from the Salesforce fields to populate the “To” field in the email.
- Change the SMTP authentication details by clicking on “Change Connection” and running through the steps to choose the right Email box to send the email from.
- Once the changes are completed, click on Save and Run.
Once the above steps are completed, you have setup your Salesforce account with the ability to send emails to customers at a near real-time frequency based on actions taken within Salesforce. You may now change some records in Salesforce and confirm that surveys are getting sent to the intended recipients.
Use case 2: Collect feedback with Experience Management and raise tickets on Salesforce basis notifications set on Experience Management
-
Click on the Logic App created in your Azure account (by importing the published JSON for Use case 2 as explained under Section 2.1)
-
Click on the “Logic App designer” menu item
- You will see the imported Logic App as shown in the image below
- Clicking on each step in the flow will expand the card to show the settings and configuration.
- At step 1, The Logic App provides a Webhook. Copy this webhook address
- Configure a notification in Experience management with the condition under which a ticket should be created in Salesforce
- Configure the webhook URL copied from the Logic App in the API Post URL section of the notification
-
Let us not configure the rest of the Logic App to get this working for your account
-
Steps 1 to 12 doesn’t need any modification. Here Logic Apps is designed to receive the Notification post from Experience management and we are declaring all the variables that are needed to be pushed to Salesforce to create a ticket
-
In the default Logic App, we are pushing the following details:
Salesforce Field | Survey response |
---|---|
Customer Name | Name |
NPS | NPS |
Description | User Comments |
Response ID | Survey response ID |
Customer Email |
- At Step 13, change the credentials to authenticate to the customer’s Experience management account
-
Step 14 and 15 can be left without any changes. At this step, all the fields from the survey response is being parsed to identify the answers that needs to be mapped to Salesforce fields called out in the table above.
-
Step 16 needs a change in authentication to map to the customer’s Salesforce account.
- Step 17 creates a note in the corresponding survey response in Experience management confirming the creation of the case in Salesforce for that response. Please change the Authentication details here to map to the customer’s Experience management account. You may also change the contents of the “Body” field to change the text to suit your requirement.
The configuration of the Logic App to achieve integration Use case 2 is completed. You may now submit some test survey responses in Experience management and confirm that tickets are getting created in Salesforce as intended.
Use case 3: Updates made on the Salesforce ticket to add a note in the corresponding Experience Management survey response
-
Click on the Logic App created in your Azure account (by importing the published JSON for Use case 3 as explained under Section 2.1)
-
Click on the “Logic App designer” menu item
- You will see the imported Logic App as shown in the image below
- Clicking on each step in the flow will expand the card to show the settings and configuration.
- At step 1, the Salesforce connector is pulling all the cases that were modified in the last one minute. Here the Connection configuration has to be changed to authenticate to the customer’s Salesforce account. The periodicity of running this action can be increased by changing the “How often do you want to check for items?” Setting.
-
We might not want to push all the changes happening on a ticket to the Experience Manager response. However, some key updates like change in Ticket Status, change in ticket priority, change in Agent assigned to the ticket, new comment being added to the ticket etc can be pushed to the survey response.
-
At step 2, we define the change that needs to be updated and also define the note that needs to be added to the survey response.
-
In this Logic App, we have defined pushing Ticket status updates to the survey response. The condition is created in such a way that it is always satisfied for any status change.
- The note to be updates is included in the “Body” section of the “If true” action. This note can be changed to suit your requirements. Please leave the URL section as is. You should also change the authentication details to authenticate to the customer’s Experience management account.
The configuration of the Logic App to achieve integration Use case 3 is completed. You may now update the case properties in Salesforce and confirm that a note is getting is updated on the corresponding survey responses in Experience management intended.