Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

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 Add Data Map.
  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. 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.

A data map that creates Opportunity records.

  1. Select Based on conditions as the Condition Type.
  2. 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
  1. Click Save.
  2. Click Back to Builder.
  3. 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.

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. Click Advanced Settings, and select Survey Data Mapping.
  2. Click Add Data Map.
  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. 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. Select Every time as the Condition Type.
  2. Click Save.
  3. Click Back to Builder.
  4. 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.

  1. Click Advanced Settings, and select Survey Data Mapping.
  2. Click Add Data Map.
  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. In the Define Target Object Fields and Values section, add the following information.

    Field

    Information Type

    Value

    Status

    Picklist

    Escalated

  7. Select Based on conditions as the Condition Type.
  8. 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
  1. Click Add Condition.
  2. 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: June 19, 2006
      The Edit Mapping window showing the details of a new data map.
  1. Click Save.
  2. Click Back to Builder.
  3. Click Back to Builder again.
  4. Click Activate in the top-right corner.
  5. 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

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios