Recipe to Push NPS Responses to Slack

  • 7
  • Article
  • Updated 1 week ago
  • (Edited)
I'm very pleased to say that I was able to set up an Advanced Outreach to push our NPS responses to Slack!

Preview in Slack

Click to Expand in Slack

My setup takes the NPS answer, and the answers to two open-ended questions, and pushes them to Slack each morning, for the survey responses submitted the previous day. Partially-submitted responses are still pushed to Slack, and if the participant further edits their response in the future, they will be pushed again.

It took me about a week to figure it out my own, and it should be considerably faster for you, with this path to follow!

Part 1: Set up your Slack Email Address
  1. Add the "Email" app to your Slack instance
  2. Add a configuration called "Gainsight"
  3. I started by having the integration post to me in a direct message, and now I have it set to post to a channel called #customer-feedback (so that I can also push other things there besides NPS, like Zendesk Satisfaction responses)
  4. Customize its icon. I used the Gainsight logo.
  5. Grab the email address that Slack has created for you
Part 2: Populate the Slack email address onto every Account
  1. Create a custom field on Customer (in Salesforce Setup > Create > Objects > Customer Info > Custom Fields > New). Here's my setup for that field:
  2. I have a nightly Rule that updates every Account. I added an Action that populates that field when it's null. Setup shown here:
Part 3: Set up your Survey Data Space

You need a Data Space set up on the "Survey User Answer" object. Do not use the "NPSSurvey Response" object, since that's only populated once the survey is "Submitted", which, if they didn't finish the survey, would be days after the user actually submitted their NPS score, from their perspective. 

Make sure that you include at least these fields:
  1. From Survey User Answer: Answer Title (this is the text of a chosen answer, like a radio button, including the NPS score itself), Answer Text (this is open-ended responses, for any such questions in your survey)
  2. From Survey User Answer > Question: Title (this is the text of the question), Question Number (so you can filter for certain questions)
  3. From Survey User Answer > Survey Master: Title (this is the name of the survey)
  4. From Survey User Answer > Participant: Last Response Record Time (this is when the participant last edited the survey response, even if the response is only partially submitted)
  5. From Survey User Answer > Participant > Contact: Email, Full Name
  6. From Survey User Answer > Participant > Account: Id, Account Name, Slack Email Destination
Part 4: Create an Advanced Outreach, using the "Email" model, and add Participants via a Bionic Query

A simple setup:

The Bionic Query:

  1. Fetch Task: Get your NPS responses from your Survey Answers Data Space. Include all the fields listed above for the Data Space. Filter for only responses from yesterday, and for the right Question Numbers for your NPS question(s). (We technically have two NPS questions in Gainsight, since different surveys go to different customer segments.) My setup:
  2. Fetch Task: Get your open-ended responses from your Survey Answers Data Space. We have multiple open-ended questions per survey, and I wanted them all pushed into Slack. I use a Formula Field (in this screenshot, called "Response for Why") to use the "concat" function to combine a super-short version of the question (in this case, "-- Why? -- ") with the answer text itself. My setup: I have two Tasks like this, each one filtering for a different question.
  3. Transform Task: You want the "From" line of the email that goes to Slack to describe who submitted the response. I use the format "FullName @ AccountName". Use this Transform Task to assemble that text using a Formula Field that uses a "concat" function. My setup: (I'm sorry I can't show the setup of the "concat" Formula Field; publishing an Advanced Outreach apparently locks you out out of viewing Formula fields in its Bionic Query.)
  4. Merge Task: Combine your NPS responses with the text from an open-ended question. My setup:
  5. Merge Task: Combine the results of the first merge with the answers to the other open-ended question. My setup:
  6. Merge Task: Combine the results of the previous merge with that "FullName @ AccountName" info. My setup:
  7. Don't forget to Schedule it! My setup:
Part 5: Configure the rest of the Sources setup
Back in the "Sources" area:
  1. You want the same participant to be able to enter the Advanced Outreach an unlimited amount of times. My setup:
  2. Some of the standard fields can be useful, but you'll also create custom fields for question responses and so on. My setup:
Part 6: Set up your email template
  1. The template should be SUPER SIMPLE. Slack does not even respect line breaks. The hardest part here is making sure that there are not an awkward number of spaces (or lack of spaces) between different info. I was careful about adding spaces to the "concat" actions in the Bionic Query. Include default values for all the tokens; I used periods for the comment questions, which a participant may leave empty, especially if they've only partially filled out the survey. My setup: If someone doesn't submit any comments in my setup, their response comes through like this:

  2. In the Advanced Outreach, configure the email template and your mappings. Keep in mind that you'll see here that "Recipient Email Address" is selected as the "To", but, in my Sources setup above, I set it to be populated by the "Customer Slack Email Destination" field. My setup:
Now publish that sucker! Encourage your team to use threaded comments to say, "hey, can't we do such-and-such about this situation?"
Photo of Seth

Seth, Champion

  • 11,232 Points 10k badge 2x thumb

Posted 1 week ago

  • 7
Photo of Denise Stokowski

Denise Stokowski, Official Rep

  • 10,912 Points 10k badge 2x thumb
Awesome Seth!  And thank you for posting the detailed instructions.
Photo of Karl Rumelhart

Karl Rumelhart, Official Rep

  • 8,230 Points 5k badge 2x thumb
Seth, dude, you such a rockstar.  Thanks for being awesome. 
Photo of Seth

Seth, Champion

  • 11,232 Points 10k badge 2x thumb
Thanks Karl! If you'd told my 13-year-old self that I would one day be a bionic rockstar, my brain probably would have exploded.

So, I guess, maybe it's better that we waited.
Photo of Liam Nicholls

Liam Nicholls

  • 202 Points 100 badge 2x thumb
Nice one Seth
Photo of Abhishek Sivaraman

Abhishek Sivaraman, Senior Product Manager

  • 6,056 Points 5k badge 2x thumb
Wow Seth ! Thanks for this amazing post with detailed instructions!