Create or Update Records Based on Responses
What’s a Survey Data Map?
Maria wants to create an Opportunity record every time a customer indicates in the post-chat survey that they are interested in purchasing another product from Ursa Major Solar. She can achieve this by creating a survey data map for the post-chat feedback survey.
Survey data maps allow you to create or update records in your Salesforce org based on the responses you receive. The data map also allows you to populate the created or updated record fields with information about the participant, their responses, or with information of your choice. Furthermore, if your survey has multiple data maps, you can configure a data map to populate a field with the ID of the record that was created or updated by another data map.
Configure a Survey Data Map to Create Records
Maria wants to create a single data map for the post-chat feedback survey. The data map will be configured to create an Opportunity record every time a customer indicates they want to purchase another product from Ursa Major Solar.
Maria wants to populate the new Opportunity records with information that will help the sales team to follow up with the customer.
Opportunity Field |
Target Information |
---|---|
Close Date |
The date by which the opportunity can be closed. |
Name |
Provides context about how the opportunity was generated |
Stage |
Informs the Sales team that this is only a prospective opportunity. |
Contact ID |
Provides details about the customer. |
Description |
Provides details about how this opportunity was generated. |
Next Step |
Informs the sales team that the customer must be contacted to understand the requirements. |
- Click Advanced Settings, and select Survey Data Mapping.
- Click Add Data Map.
- Enter the map’s name:
Post-support chat opportunity
- Select Create record as the Action Type.
- Search and select Opportunity as the Target Object.
- In the Define Target Object Fields and Values section, provide this information. Click Add Row to add more rows.
Field |
Information Type |
Value |
---|---|---|
Close Date |
Date |
Dec 31, 2022 |
Name |
String |
Existing customer may purchase another product. |
Stage |
Picklist |
Prospecting |
Contact ID |
Associated Record ID |
Contact |
Description |
String |
Interest was expressed while responding to a post-support chat feedback survey. |
Private |
Boolean |
False |
Next Step |
String |
Contact the customer to understand the requirements. |
- Select Based on conditions as the Condition Type.
- Define the following condition:
- Select Condition: All conditions are met
- Logic type: Response to Question
- Select Question: Would you like to purchase another product from {!CompanyName}.
- Select Operator: equals
- Select Value: Yes
- Click Save.
- Click Back to Builder.
- Click Back to Builder again.
Configure a Data Map to Update Cases
Creating a data map didn’t take half the time Maria expected it to. This data map will help the sales team, so now she wants to earn a few brownie points with the support team as well! A Case record is created every time a customer initiates a chat session. Maria wants to update a field in the Case record with the rating provided to the support agent by the customer. Maria creates a text type custom field on the Case object named Agent Rating.
- Click Advanced Settings, and select Survey Data Mapping.
- Click Add Data Map.
- Enter the map’s name:
Agent rating
- Select Update record as the Action Type.
- Search and select Case as the Target Object.
- In the Define Target Object Fields and Values section, provide this information:
Field |
Information Type |
Value |
---|---|---|
Agent Rating |
Response to Question |
How was your experience interacting with our support agent, {!CaseDetails.Owner:User.FirstName}? |
- Select Every time as the Condition Type.
- Click Save.
- Click Back to Builder.
- Click Back to Builder again.
Use Merge Fields in Data Maps
For greater flexibility while creating surveys, Maria can use merge fields in data maps. She can use participant data, associated data, custom variables, or org variables that she defined while configuring merge fields.
She decides to create a data map that updates the status of a case record from closed to escalated, based on the customer’s experience of interacting with a support agent. She uses merge fields to resolve with information about the rating the survey recipient provides. For a start, she targets customers who are at least 18 years old.
Here’s what Maria does.
- Click Advanced Settings, and select Survey Data Mapping.
- Click Add Data Map.
- Enter the map’s name:
Post-support case escalation
- Select Update record as the Action Type.
- Search and select Case as the Target Object.
- In the Define Target Object Fields and Values section, add the following information.
Field
Information Type
Value
Status
Picklist
Escalated
- Select Based on conditions as the Condition Type.
- Define the following condition.
- Select Condition: All conditions are met
- Logic type: Response to Question
- Select Question: How was your experience interacting with our support agent, {!CaseDetails.Owner:User.First Name}?
- Select Operator: is less than
- Select Value: 4
- Click Add Condition.
- Define the following condition.
- Logic type: Participant Record
- Select Field: Birthdate
- Select Operator: is greater than or equal to
- Select Value: June 19, 2006
- Click Save.
- Click Back to Builder.
- Click Back to Builder again.
- Click Activate in the top-right corner.
- Click Got It to confirm.
Turn Responses to Records
Maria has created two data maps: one to create Opportunity records and the other to update Case records. Her post-chat feedback survey is also personalized for her customers, thanks to merge fields. All that’s left to do is to set up web chat to gather post-chat feedback using Salesforce Surveys.
Resources