Skip to main content

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.

Note

You can create up to 20 data maps for each survey.

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.

  1. Click Advanced Settings, and select Survey Data Mapping.
  2. Click New Mapping.
  3. Enter the map’s name: Post-support chat opportunity
  4. Select Create record as the Action Type.
  5. Search and select Opportunity as the Target Object.
  6. Select Based on conditions as the Condition Type.
  7. 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
  8. 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

Contact ID

Associated Record ID

Contact

Description

String

Interest was expressed while responding to a post-support chat feedback survey.

Private

Boolean

False

Name

String

Existing customer may purchase another product.

Next Step

String

Contact the customer to understand the requirements.

Stage

Picklist

Prospecting

 A data map that creates Opportunity records.

9. Click Save.

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.

Note

Your Trailhead Playground doesn’t contain the Agent Rating custom field. You can create it if you want to follow along with the next set of steps. You won’t be tested on these steps.

  1. Navigate to the Survey Data Mapping list.
  2. Click New Mapping.
  3. Enter the map’s name: Agent rating.
  4. Select Update record as the Action Type.
  5. Search and select Case as the Target Object.
  6. Select Every time as the Condition Type.
  7. 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}?

 A data map that updates Case records.

  1. Click Save.
  2. Click Back to Builder.

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.

  1. Navigate to the Survey Data Mapping list.
  2. Click New Mapping.
  3. Enter the map’s name: Post-support case escalation
  4. Select Update record as the Action Type.
  5. Search and select Case as the Target Object.
  6. Select Based on conditions as the Condition Type.
  7. Define the following condition.
    1. Select Condition: All conditions are met
    2. Logic type: Response to Question
    3. Select Question: How was your experience interacting with our support agent, {!CaseDetails.Owner:User.First Name}?
    4. Select Operator: is less than
    5. Select Value: 4
  8. Click +Add Condition.
  9. Define the following condition.
    1. Logic type: Participant Record
    2. Select Field: Birthdate
    3. Select Operator: is greater than or equal to
    4. Select Value: Feb 5, 2004
  10. In the Define Target Object Fields and Values section, add the following information.
    Field Information Type Value
    Status Picklist Escalated
     The Edit Mapping window showing the details of a new mapping.
  11. Click Save.
  12. Click Back to Builder.
  13. Click Activate in the top-right corner.

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

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities