It is possible to personalize links with information from another system using a REST API. For this, you use automation fields.
To use this function, follow these steps:
Adjust REST API
When you want to apply link personalization using automation fields, an adjustment is needed in the REST API. You can read more about this in the article: Trigger automations.
A message with automation fields
To apply automation fields in your message, follow these steps:
- Click on the link icon to add a link to the desired element, such as a button, text, or image. Then click on the personalization icon {p} next to the URL input field. An additional pop-up will now open. Under Personalization type, select Automation field. In the Label field, enter the name that the external trigger will use to fill in the desired URL.
-
As usual, you now specify the link name for the mailing report and whether it is a conversion link. Click Ok to complete the process for this specific link.
- Below is a screenshot of a system that can trigger the external trigger and send JSON. In this example, the Label mentioned above is replaced with the URL http://spotler.nl.
For more information about external triggers, see the documentation on REST API in Spotler Mail+.
Setting up an automation
You have adjusted the REST API and prepared a message with automation fields. The final step is to set up an automation so that the fields in your message can be filled via the REST API. Follow these steps:
- Create a New automation
- In the automation editor, choose the trigger: External trigger
Choosing this trigger will give you a code. This code is necessary for your system to give a signal towards Spotler to start an automation. The label provided has the same name as the one you specified for the automation.
- As Send action, you choose Email.
Now select the email with the automation fields you just created. - Publish the automation.