1. Home
  2. Integrations
  3. Writing back responses into Salesforce (Classic) Cases

Writing back responses into Salesforce (Classic) Cases

This functionality requires a Salesforce ENTERPRISE plan, as it relies on workflows.
This is also only applicable to Salesforce Classic.

If you’re interested in Lightning Experience writebacks, please get in touch.


This article describes how to write back a Customer Thermometer rating against a Case object.

It is possible many of the steps below them will already be set up within your instance. You may therefore be able to skip a few elements.

This process relies on Customer Thermometer’s email alerts being sent into Salesforce, parsed for the Thread ID and then running rules associated with the case.

Once complete, you will see screens similar to this:

CT ratings inside Salesforce

Step 1 – Enable Email to Case

Visit BUILD > Customize > Cases > Email-to-Case

Enable this feature if it isn’t already enabled.

Set up a forwarding address within your email system. Typically this will be an address such as sfsupport@domain.com. Forward it to the SF generated address which looks something like:


This will need to be verified.

Note you could use this Saleforce generated Email Services Address – it’s just not overly elegant!

This will ensure that alert emails sent from Customer Thermometer, following a response, will be routed into your Salesforce account.

Make a note of the address – we’ll need it at the end of the setup.

Step 2 – Set up relevant custom fields

Visit BUILD > Customize > Cases > Fields

Set up a new Picklist field. We’ve called it “CT rating” – it can be called anything you like.

CT rating picklist

In order to view the data, make sure this field is then added to the relevant user views.

Step 3 – Set up Workflow Rules

Visit BUILD > Create > Workflow & Approvals > Workflow Rules

Set up four different Rules, which set the case rating field, to the correct rating.

Each one should look like this:

Workflow rules

Follow the wizard and then add an action for each rule. In this case, the action is a Field Update:


This needs to be repeated for all 4 rating types.

Ensure you activate each one. They are deactivated by default.

This now means, if Salesforce receives an email alert from Customer Thermometer with “Gold” in the subject, the CT Rating field registered against each Case object will change its value to “Gold” from its previous (or null) rating.

Step 4 – Add feedback buttons to Case responses

Create an Email Communication Template, “CT Signature”. Add the 4 ratings icons, each with a unique hyperlink. See the Thermometer setup guide for how to create these.

It will look something like this:

Communication template

The blue squares will not appear in emails when sent.

When you generate the embed code, we suggest the following Salesforce variables:

Variables survey app

Email: {!Case.SuppliedEmail}

First name: {!Case.SuppliedName}

Company: {!Case.SuppliedCompany}

Custom 2: {!Case.CaseNumber}

Custom 3: {!Case.OwnerEmail}

Custom 4: {!Case.OwnerFullName}

Custom 5: {!Case.Status}

Custom 10: {!Case.Thread_Id}

The “Case.Supplied” variables will probably be the most useful (depending on how you set up Salesforce and use the workflows). This will ensure you get useful response data registered inside Customer Thermometer.

Case.Thread_Id” is a unique code, which will ensure the Response alert emails route into the correct Case object, thanks to Salesforce parsing.  We suggested adding that to Custom 10, so that this reference doesn’t appear on your CT reporting screens (only fields up to Custom 3 appear).

Step 5 – Finishing touches – icons instead of text

This is a nice to have, but a powerful addition.

Create a second custom field in the Case Object. This will then be directly linked, via formula to the original CT Rating field, we created earlier.

Visit BUILD > Customize > Cases > Fields

Set up a new Formula (Text) field. We’ve called it “CT Temperature”. Call it anything you wish.

In the formula area, enter the following code:


Save that field and then you’ll need to upload the 5 icons which the Formula refers to.

Download each of the 5 images below to your hard drive.

Right click and choose “file save as” (or the equivalent) on each image:

CTGoldCTGreen CTYellow CTRed CTNone

The image upload area is hidden away in BUILD > Develop > Static Resources

Click ‘NEW’ in the Static Resources screen and then upload each image separately.

Ensure you name the images exactly as they are referred to in the Formula above.

Your Salesforce setup is now complete.

Step 6 – Thermometer admin

Each time a response is received by Customer Thermometer, you need to trigger an email alert.

Go back into your Customer Thermometer account and edit your Salesforce Thermometer.

Go to Email Alert notifications and enter the Salesforce address from Step 1 above.
Ensure all boxes are ticked:

Email alerts setup

Save your Thermometer and then test your workflow.

Updated on April 20, 2020

Related Articles