Warning: Push back feature for Salesforce is on sunset mode from 1st March 2024. We kindly request you to use the new alternate feature which is the Outgoing Webhook for any new setups.


The Push Criteria tab allows you to configure what data you'd like to push back into Salesforce when a survey gets completed.

This support article is split in two sections; "Set-up" and "Details".

"Setup" will cover how to configure each field, whereas Details goes more in-depth and prevents common pitfalls.


Good to Know

  • Salesforce field names in the push mapping are case-sensitive.


Setup

Push Setup

Pushing records from CustomerGauge to Salesforce is optional.

You can push either new records, or update existing records in Salesforce.


For the purpose of this support article, we'll assume that you do want to Push data into Salesforce.


Push Mapping


Push Filters

If you don't want to push all survey responses to your Salesforce system for an integration, you can add filters into the push mapping. Records that match the filter criteria, will be pushed to Salesforce.


Emphasis: If not using Push Filters, all survey responses — regardless of where they came from — will be pushed to your Salesforce system. This includes survey responses from any other Transactional import source — other integrations, manual uploads, POST Transactional API etc.


Simply add a "filters" property to the same JSON object that holds "object" and "fields".

[
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Survey_ID__c": "{number_customergauge}",
"Survey_Sent_Date__c": "{date_email_sent}",
"Date_Form_Completed__c": "{date_form_completed}",
"NPS_Score__c": "{q1}"
},
"filters": {}
}
]

Then, add your filter JSON structure for each field you would like to filter on, like so;

[
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Survey_ID__c": "{number_customergauge}",
"Survey_Sent_Date__c": "{date_email_sent}",
"Date_Form_Completed__c": "{date_form_completed}",
"NPS_Score__c": "{q1}"
},
"filters": {
"country": {
"operator": "=",
"values": [
"NL", "BE"
]
}
}
}
]


More details about filtering, including how it works, can be found in the respective section below.


Details

Inserting new records

[
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Name": "CXM Survey",
"Survey_ID__c": "{number_customergauge}",
"Survey_Sent_Date__c": "{date_email_sent}",
"Date_Form_Completed__c": "{date_form_completed}",
"Follow_up_Required__c": "{answer_required}",
"Requested_Contact__c": "{segment_y}",
"Net_Promoter_Score__c": "{q1}",
"Customer_Satisfaction_Score__c": "{additional_question_2}",
"Self_Select_Reason__c": "{parent_level_box},{child_level_box}",
"Survey_Comment__c": "{comment}",
"Firefighting__c": "{categorize_url}"
}
}
]


In this example we create a new record in the custom object "Survey Result".

We push various survey answers, as well as providing a static name for the record; "CXM Survey".


Updating existing records

[
{
"object": "Contact",
"method": "update",
"id": "{number_customer}",
"fields": {
"CompletedSurvey__c": "True",
"LastSurveyDeepLink__c": "{categorize_url}"
}
}
]

In this example we update an existing record in the Salesforce object "Contact".

We want to update the custom field "Completed Survey" to True, to indicate that this Contact has completed their survey.

We also want to add a deep link to CustomerGauge, so we can easily access this survey response in CustomerGauge while we're in Salesforce.


For this example, we assume that we have stored the original Contact ID in the CustomerGauge field "number_customer".

In order to update existing Salesforce records, you always need to have a valid unique identifier, so make sure to Pull that information!


Pushing to multiple objects

[
{
"object": "Contact",
"method": "update",
"id": "{number_customer}",
"fields": {
"CompletedSurvey__c": "True",
"LastSurveyDeepLink__c": "{categorize_url}"
}
},
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Name": "CXM Survey",
"Survey_ID__c": "{number_customergauge}",
"Survey_Sent_Date__c": "{date_email_sent}",
"Date_Form_Completed__c": "{date_form_completed}",
"Follow_up_Required__c": "{answer_required}",
"Requested_Contact__c": "{segment_y}",
"Net_Promoter_Score__c": "{q1}",
"Customer_Satisfaction_Score__c": "{additional_question_2}",
"Self_Select_Reason__c": "{parent_level_box},{child_level_box}",
"Survey_Comment__c": "{comment}",
"Firefighting__c": "{categorize_url}"
}
}
]

We can combine the above two examples, allowing us to store the survey results in Salesforce, as well as updating the Contact that was surveyed.


Pushing segment values

To push the value of a segment field attached to a survey record, you just have to relate to the segment field.

Segment fields are customer-specific; your Customer Success Manager can help you identify the field names of your segments.


As an example, let's assume that you have the segment field Industry, which is called "segment_a".

You would then provide this field in your Push Mapping as follows;

[
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Industry__c": "{segment_a}"
}
}
]


Pushing additional question answers

To push answers of additional questions, make sure you have an appropriate field in your Salesforce.

Once you have that, you can easily assign an additional question to it in the Push Mapping.

[
{
"object": "AdditionalQuestions__c",
"method": "insert",
"fields": {
"Survey_ID__c": "{number_customergauge}",
"CSAT__c": "{additional_question_1}",
"Rating__c": "{additional_question_2}",
"AdditionalComment__c": "{additional_question_3}",
"PreferredContactMethod__c": "{additional_question_4}"
}
}
]

Simply provide the CustomerGauge field "Additional_question_" combined with the Question ID.


You can find the Question IDs in two ways;

  • In the Export Engine, find the number next "Question #" in the additional questions drop-down.
  • In the Report Hub, when editing an Additional Question widget, find the number next "Question #" in the additional questions drop-down.


Filtering

For each field you want to filter on, you should add the following filter JSON object;

"field_name": {
"operator": "operator_value",
"values": [
"field_value_1", "field_value_2"
]
}

field_name: This is the CustomerGauge Field name that you would want to filter on.

operator_value: This can be "=" (equal) or "!=" (not equal). If "=", a record needs to match any of the values in the values array. If "!=", a record should not match any of the values in the values array.

field_value_X: These are the exact values that a record should be compared against.


Once you've filled in the above three parts in your filter JSON object, it should look something like this;

"country": {
"operator": "=",
"values": [
"NL", "BE"
]
}


Looking at the whole resulting Push Mapping, it will look something like this;

[
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Survey_ID__c": "{number_customergauge}",
"Survey_Sent_Date__c": "{date_email_sent}",
"Date_Form_Completed__c": "{date_form_completed}",
"NPS_Score__c": "{q1}"
},
"filters": {
"country": {
"operator": "=",
"values": [
"NL", "BE"
]
}
}
}
]


Filtering on multiple fields

You can filter on multiple fields at the same time. Simply add more filter JSON objects to the "filters" in your Push Mapping;

"filters": {
"country": {
"operator": "=",
"values": [
"NL", "BE"
]
},
"segment_a": {
"operator": "=",
"values": [
"Salesforce"
]
}
}

Only push records if the Country is "NL or BE" and Segment A is "Salesforce"


Filtering in multi-object pushes

You can apply different (or the same) filters on different objects. In this case, we want to Open a Case in Salesforce, if a Detractor Score is left on the survey;

[
{
"object": "Case",
"method": "insert",
"fields": {
"Related_Survey_ID__c": "{number_customergauge}",
"Description": "{comment}",
"Status": "New"
},
"filters": {
"q1": {
"operator": "=",
"values": [ 0, 1, 2, 3, 4, 5, 6 ]
}
}
},
{
"object": "Survey_Result__c",
"method": "insert",
"fields": {
"Name": "CXM Survey",
"Survey_ID__c": "{number_customergauge}",
"Survey_Sent_Date__c": "{date_email_sent}",
"Date_Form_Completed__c": "{date_form_completed}",
"Follow_up_Required__c": "{answer_required}",
"Requested_Contact__c": "{segment_y}",
"Net_Promoter_Score__c": "{q1}",
"Customer_Satisfaction_Score__c": "{additional_question_2}",
"Self_Select_Reason__c": "{parent_level_box},{child_level_box}",
"Survey_Comment__c": "{comment}",
"Firefighting__c": "{categorize_url}"
}
}
]



Examples

Looking for some inspiration, or would you just like to see more examples?

Our Examples page should help you on your way!


« Back to "Flag Criteria"

Continue to "Diagnostics" »