All Collections
Integrations
Salesforce
Export survey data to Salesforce
Export survey data to Salesforce
Alex Bitca avatar
Written by Alex Bitca
Updated over a week ago

Content:

πŸ“š Related articles


​NOTE: Click here to learn more about using the Salesforce integration to sync your customers to Retently.

The native Salesforce integration allows you to export survey data, assign them as contact (or account) properties, and add them as notes in the contact's profile in Salesforce.

IMPORTANT: Retently sends survey data only to Salesforce contacts or accounts (person account objects are not currently supported). When our app sends survey data, our integration uses the email address of the customer that answered the survey. If the integration can't find the customer in Salesforce, then no survey data is sent.

The notes will be created automatically and this doesn't require any adjustments on your end. But to push the score, comment, and last survey date in Salesforce fields you will need to create custom fields in Salesforce, which we will cover in detail in this article.

Authorize Retently

Go to the Integrations Page in your Retently Account and click connect next to the Salesforce widget.

Once you clicked Connect you will be prompted to the authorization page, just click Allow.

Once the permissions are accepted, you will return to the Salesforce Integrations Page where you will see all your lists that are ready to be synced.

Create custom fields

To be able to export survey data (scores, feedback, and the last survey date) to Salesforce you'll have to create custom fields in Salesforce so that survey data can be exported and stored in them.

IMPORTANT: Make sure to create all the survey data fields in Salesforce, otherwise the data will not be exported. We will list all the fields below.
​
First, log in to your Salesforce account and access the Setup section.

From the left sidebar access Objects and fields > Object manager > Contact > Fields and relationships.

Add NPS Score field

Click the New button in the Fields & Relationships section.

Select Text option and click Next.

NOTE: The "Number" option is also supported for the NPS score field.

Fill in mandatory fields:

  • Field Label: NPS Score

  • Length: 10

  • Field Name: NPS_Score

Click on the Next button.

Establish field-level security and click Next.

Add to page layouts and click Save.

Review the field definition. NPS Score field API Name should be NPS_Score__c

Add NPS Comment field

Click on the New button in the Fields & Relationships section.

Select Text Area and click on Next button.

Fill in mandatory fields:

  • Field Label: NPS Feedback

  • Field Name: NPS_Feedback

And click on Next button.

Establish field-level security and click on Next button.

Add to page layouts and click on Save button.

Review the field definition. NPS Feedback field API Name should be NPS_Feedback__c

Add NPS Last Survey field

Click on the New button in the Fields & Relationships section.

Select Date/Time and click on Next button.

Fill in mandatory fields:

  • Field Label: NPS Last Survey Date

  • Field Name: NPS_Last_Survey_Date

And click on Next button.

Establish field-level security and click on Next button.

Add to page layouts and click on Save button.

Review the field definition. NPS Last Survey Date field API Name should be NPS_Last_Survey_Date__c.

Once you have set up the fields, every time a customer will receive a survey, the date will be exported automatically to the NPS Last Survey Date field. Also, every time a customer will answer a survey, the score and the text comment will be imported to Salesforce and assigned to the contact's profile.Add NPS Score field

Add Account Metric Score Field

First, log in to your Salesforce account and access the Setup section. From the left sidebar, access Objects and fields > Object manager > Account > Fields and relationships. Click the New button in the Fields & Relationships section. You will need to have all the fields you want to export in your account to export the Account related Metrics.

Add NPS Account Score Field

Select Number option and click Next.

Fill in mandatory fields:

  • Field Label: NPS Account Score

  • Length: 17

  • Decimal Places: 1

  • Field Name: acc_nps_score

Click on the Next button.

Establish field-level security and click Next.

Add to page layouts and click Save.

Review the field definition. NPS Account Score field API Name should be acc_nps_score__c.

Add CSAT Account Score Field

Select Number option and click Next.

Fill in mandatory fields:

  • Field Label: CSAT Account Score

  • Length: 17

  • Decimal Places: 1

  • Field Name: acc_csat_score

Click on the Next button.

Establish field-level security and click Next.

Add to page layouts and click Save.

Review the field definition. CSAT Account Score field API Name should be acc_csat_score__c.

Add CES Account Score Field

Select Number option and click Next.

Fill in mandatory fields:

  • Field Label: CES Account Score

  • Length: 17

  • Decimal Places: 1

  • Field Name: acc_ces_score

Click on the Next button.

Establish field-level security and click Next.

Add to page layouts and click Save.

Review the field definition. CES Account Score field API Name should be acc_ces_score__c.

Add XSAT Account Score Field

Select Number option and click Next.

Fill in mandatory fields:

  • Field Label: XSAT Account Score

  • Length: 17

  • Decimal Places: 1

  • Field Name: acc_xsat_score

Click on the Next button.

Establish field-level security and click Next.

Add to page layouts and click Save.

Review the field definition. XSAT Account Score field API Name should be acc_xsat_score__c.

Add STAR Account Score Field

Select Number option and click Next.

Fill in mandatory fields:

  • Field Label: STAR Account Score

  • Length: 17

  • Decimal Places: 1

  • Field Name: acc_star_score

Click on the Next button.

Establish field-level security and click Next.

Add to page layouts and click Save.

Review the field definition. STAR Account Score field API Name should be acc_star_score__c.

Manage the survey data export

In the campaign you want to export data from, choose the submenu "Export".

Next, go to the "Export" section in your campaign, and click the OFF toggle next to Salesforce:

By default, all options are selected, but you can remove the checkmark to the fields that you don't want to export to Salesforce.

After configuring your export and saving the campaign settings, every time you will receive a new survey response in this campaign, the integration will automatically export the selected fields to Salesforce.

The integration can export the following data:

  • Response rating - Export the answer to the Main Rating question as a contact property in Salesforce.

  • Response text feedback - Export the comment left to the Main Open-ended question as a contact property in Salesforce.

  • *Last survey response date - Export the date of the last received response as a contact property in Salesforce.

  • *Last survey sent date - Export the date of the last survey sent as a contact property in Salesforce.

  • Response as a note - Automatically generate a note with the survey response details and add it to the contact's profile in Salesforce.

​ * Both those fields are exported to the field NPS_Last_Survey_Date

NOTE: If the customer answers another survey, the data in these fields will update automatically to display the latest survey data. Except for the notes, as they are not updated. Instead, a new note will be created with the new response.


​

Did this answer your question?