Skip to main content
All CollectionsSurvey campaignsTransactional Survey Campaigns
Transactional survey trigger via Salesforce
Transactional survey trigger via Salesforce
Alex Bitca avatar
Written by Alex Bitca
Updated over a year ago

Transactional surveys are sent when an external event is triggered. In simpler words, when something happens outside of Retently, a survey is triggered.

Retently email and in-app transactional surveys can be triggered by multiple external services.

In this article, we will cover how you can trigger a survey via Salesforce.

Set up Salesforce events for your survey campaign

Create a Salesforce Outbound Message

Outbound Messages are Salesforce actions that you can assign to Salesforce Flows events. In an Outbound Message, you can select what Salesforce fields you need to export, and you will have to pass a webhook link (e.g., Retently's webhook link) where those fields will be sent.

To get started, log into your Salesforce account, access the Setup area, and type "Outbound Messages" in the search field.

On the Outbound Messages page, click the "New Outbound Message" button.

On the next step, choose "Contact" as the message's object.

In the Outbound Message edit page, the most important part here is to include the Retently webhook link that was generated in your campaign’s Setup section. Include the link in the “Endpoint URL” input field.

Next, choose the properties that you want to send to Retently along with your customer record when the survey will be triggered. Learn more about importing contact properties from Salesforce to Retently.

NOTE: The only mandatory property is the email address of your contact. If there is no specific field such as Contact email, then the first field containing an email will be used for the creation of customers.

Finally, save your Outbound message. You will need to assign it later to a Salesforce Flow.

Create a Salesforce Flow

Now we can start creating our Salesforce event that will trigger the survey. The event is composed of a Flow connected to an Outbound Message.

To get started, access the Setup area and type "Flows" in the search field.

Next, click the "New flow" button.

When creating the new flow choose the "Record-Triggered Flow" option.

Next, you will have to configure your flow's event, which is represented by a set of rules that will eventually trigger the survey in your transactional campaign in Retently.

Select “Contact” as the object to which this workflow applies:

Next, choose an option that will trigger your flow:

  • A record is created

  • A record is updated

  • A record is created or updated (recommended)

  • A record is deleted

For the entry conditions of your flow, choose an option that works best for you. For example, if your flow will have multiple conditions, choose whether all conditions should be met, or at least one condition, or you can create a custom logic.

Afterward, you can configure the rules that will trigger your flow and will subsequently send the survey in Retently.

And on the next step is an important configuration asking you when exactly should the flow run if a contact is updated:

  • Every time the contact is updated and meets the conditions: This means that no matter what is updated in the contacts record, as long as the contact matches your conditions, the flow will be triggered. If this option is selected, this might result in multiple surveys sent to the same person.

  • When the contact is updated TO MEET the condition: This means that the flow will be triggered only if the contact started to meet your conditions after an update. This is the recommended option.

Once you've configured the flow, you will be redirected to the flow's visual builder. The next step is to add an action by clicking the + icon.

From the "Interaction" menu, choose the Action option.

In the Action popup, type in the name of the Outbound Message that you have just created.

And give the Outbound Message a specific label and API name. You may not need the name and the label further on, but since these are required, make sure to type something meaningful, that would describe what you're trying to accomplish with that Outbound Message.

After you've assigned the Outbound Message as an action, click "Save".

You can run a quick test and see if your flow works ok. To do this, click the "Run" button, and after a few seconds, check your Outbox page in Retently to see if a survey was sent to a contact that has matched your flow's trigger rules.

If everything looks ok, then you can activate your flow by clicking the "Activate" button, and from that moment on, every time a contact will match your flow's trigger rules, the contact's data (selected in the Outbound Message) will be sent to your Retently account, where a new contact record will be created (or updated, if you already have a contact with that email address) and a transactional email survey will be sent to the contact.

Click here to learn about other trigger services that we’re supporting.

Did this answer your question?