Transactional surveys are sent when an external event is triggered. In simpler words, when something happens outside of Retently, a survey is triggered.
In this article, we will cover how you can trigger a survey via Yotpo SMS & Email Flows.
Set up a transactional campaign in Retently
Start with creating a new transactional (email or in-app campaign) in your Retently account.
Review all campaign sections and adjust them as needed: templates, audience, trigger, reminders, alerts, autoreplies, etc.
Next, go to the Trigger section, select "Yotpo" from the triggers menu, and copy the generated webhook URL; you will need to add it soon to Yotpo.
After you've finished adjusting your campaign, you can save it and switch it ON. No surveys will be sent out just yet, as the campaign needs to be connected to an external source of events, in this case, Yotpo.
Track Yotpo events via Flows
Log into your Yotpo account and navigate to the Flows page. Here, you can either create a new Flow or edit an existing one that aligns with your campaign goals.
When building your Flow, you'll need to choose a trigger event that will prompt the survey dispatch.
Once your trigger is configured, the next step is to add a webhook action to your Flow.
In the webhook editor, you will find a “URL destination” text field. Here, you should enter the webhook URL provided in your Retently campaign’s Guide or Trigger sections. Ensure that Yotpo is selected as the trigger service in the Trigger section.
It's important to note that you do not need to add any information to the “Headers” fields.
In the “JSON payload” text field, you should input the following JSON object:
{ "email": "{CustomerEmail}" }
Import custom Yotpo events
If needed, you can also send other properties to Retently. To do this, follow this short tutorial:
Create the property in Retently first, and make sure the property name is written in lowercase and spaces are replaced with underscores. For example, instead of Register Date, your property should be register_date: https://app.retently.com/settings/contact-attributes/contact-props.
Next, add the property name to the "JSON payload" field in Yotpo Flow.
Finally, make sure that the Retently property has a Yotpo shortcode field associated (the element in the {{}} symbols).
Once everything looks ok, you can save your Yotpo Flow, and the moment you activate it, every time the Flow's trigger is fired, the contact will receive a survey via Retently.