Suivez votre progression
Accueil Trailhead
Accueil Trailhead

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 would be 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

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 Conditions Type.
  7. Define the following condition:
    • Select Condition: All conditions are met
    • 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 enter the last three.
    Field Information Type Value
    Close Date
    Date
    Dec 31, 2022
    Private
    Boolean
    False
    Name
    String
    Existing customer may purchase another product.
    Stage
    Picklist
    Prospecting
    Contact ID
    Associated Record
    Contact
    Description
    String
    Interest was expressed while responding to a post-support chat feedback survey.
    Next Step
    String
    Contact the customer to understand the requirements.
    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

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. However, if you choose not to get hands on here, you still need to activate your survey. To do that, go back to the builder, and click Activate in the top-right corner.

  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 Conditions 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.
  8. Click Save.
  9. Click Back to Builder.
  10. 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