Retently has a native integration with Salesforce that can be used to automatically sync all your contacts to Retently on a daily basis. However, due to performance concerns, the integration will not allow you to activate the automated sync if your contacts number in Salesforce exceeds 10,000 records.

In this case, you can apply our webhook solution to make sure that your contacts are automatically imported and updated to Retently.

To briefly explain how the solution would work:

  • You will need to generate a webhook link in Retently.

  • Next, you will have to create a Workflow Rule in Salesforce to specify what contacts are eligible to be imported to Retently.

  • Finally, you will have to add "Outbound Message" as your Salesforce Workflow Action, where you will be asked to provide Retently's webhook link that will handle the contacts' import and update in Retently.

I will cover these steps in detail below.

Generate a webhook link in Retently

Currently, Retently webhook links can be generated only in Transactional Email campaigns, because their main purpose is to import/update a customer and trigger a survey in a transactional campaign.

Therefore, there are two things we have to do:

  1. Generate the webhook link;

  2. Make sure that the customer added via the webhook link will not receive a survey in the transactional campaign.

Start with creating a new campaign on the Campaigns page. When creating a new campaign, follow these steps:

  • Choose any metric (it really does not matter, because your contacts will not be surveyed in this campaign).

  • Choose "Email" as the channel.

  • Choose "Transactional" as the campaign type.

In your campaign builder go to the "Schedule" tab, and in the "Survey triggered via" section, select Salesforce from the dropdown menu.

Next, access the "Setup" tab in your campaign, and there you will find the Retently webhook link generated for this particular campaign. Copy and save it somewhere handy, as you will need it soon.

There are a few more quick things that you have to do to complete this step:

1. On the "Audience" tab you will have to set a rule that no contact from your Salesforce account would ever match.

For example: Email address -> contains -> testemail@thisisatestdomain.retently

This is required to make sure that contacts added via the webhook link will not match this campaign and will not receive a transactional survey.

2. Make sure to assign a survey template, because you will need to be able to activate your campaign for the webhook link to work.

3. Finally, activate your campaign by switching the toggle ON. Also, as a recommendation, you can rename the campaign to make sure that other users in your account will not deactivate or use it for surveys by mistake. A name like "DO NOT TOUCH" should work.

Create a Salesforce Workflow Rule

The next step is to create a Workflow Rule in your Salesforce account, where you will specify what contacts should be sent to Retently.

Log into your Salesforce account, and access the Setup area, where you will need to create a new Workflow Rule.

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

On the next step, give your rule a name, for instance, “Contacts for Retently”. Then, select the “created, and every time it's edited” option as the evaluation criteria.

Finally, for your rule criteria, set filters to choose a specific segment of your contacts that should be added to Retently, and click "Save" to go to the next step.

You can read more about creating workflows in Salesforce here.

Add "Outbound Message" and your Workflow action

Once you have saved the Workflow Rule, on the new screen that appears, under "Immediate Workflow Actions" use the "Add Workflow Action" drop-down, and choose "New Outbound Message":

You can read more about creating new outbound messages in Salesforce here.

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 contact record.

NOTE: The only mandatory property is the email address of your contact.

You can also pass other Salesforce properties as well. For this you will need to:

  • Select the property from the "Available Fields" and add it to the "Selected Fields" in your "Outbound Message" builder.

  • Make sure you have this property in Retently so that our system can match it automatically when the contact will be added. The property in Retently should have the exact name as the property in Salesforce. Therefore, you can simply copy the Salesforce property name from this page and create an identical one in Retently (and make sure the Retently property also has the correct property type: text, number, date). For example, if you want to push to Retently the "Sign_up__c" Salesforce property, then you should have an identical one in Retently.

Make sure to check this article for details: Learn more about importing contact properties from Salesforce to Retently.

Finally, save your Outbound message and make sure that your Workflow Rule is active.

From now on, every time a contact will match your workflow rule criteria, the outbound message will pass the data through the Retently webhook link and the contact will be created (or updated) in Retently.

Did this answer your question?