With the Spotler products Spotler Automation and Spotler eCommerce you can use automations without technical knowledge. These automations are also called 'event-driven', 'event-based' or 'trigger-based' campaigns. This means that in response to an event, an automation is automatically started for a certain contact. Within such an automation, various steps can be set, such as sending an email, assigning a tag or scoring, changing the database or sending an SMS. This powerful function in Spotler can be controlled from a linked system.
On this page you can read all information about the REST API in combination with automations:
Get all automations
To trigger the Spotler automations externally, these automations must first be set up in the external system. For this it is possible to get the list of all automations from Spotler, so that the automations can be linked to events or actions in the linked system.
Get all automations
With the Spotler API you can trigger automations in Spotler from the external system. For example, an automatic welcome campaign, an invitation to a survey or the handling of a brochure request. The reason for triggering is an event in the external system. This can be an automatic process in the background or a manual action by the user.
To trigger an automations from the external system you need at least two things:
- The externalContactId of the contact for which you want to trigger the automation. See Synchronize contacts.
- The triggercode of the automation.
This triggercode is a unique reference to the implemented trigger of the automation in Spotler. The triggercode is created automatically once you add an 'external trigger' to an automation in Spotler. You can copy this manually from Spotler or get it automatically via the API. View Introduction Automations to learn how to create an automation with an external trigger.
Trigger an automation for a specific contact
For some automations it is necessary to also stop the automations by the external system. An example: a life-cycle automation is triggered for a contact when the status is converted from 'prospect' to 'customer'. If this customer becomes an ex-customer? Then the life-cycle automation must be stopped for this contact. The steps within the automation that still had to take place for this contact are no longer performed.
Stopping an automation can be done in two ways via the Spotler API:
- Stopping all automation participations of a certain contact at once. You then only need the externalContactId and the triggercode of the automation. If a contact has been triggered multiple times in the same automation, you can stop all participations at once. This is easy to implement and sufficient in most situations.
- Stopping a specific automation participation of a certain contact. You then need the automationContactId that you got back in the publishedAutomationResults when triggering the automation. This is a bit more difficult to implement as you will have to save this value somewhere. This is only necessary for automations with a repetitive character.
Stopping all automation participations of a certain contact
Personalisation in your automation message
It is possible to display personalised content from the external system in an automation message. We call these automationfields. An advantage of using automationfields is that this data does not have to be stored in the Spotler database. At the moment of triggering, the data is immediately sent via the Spotler API. This way you always have the most up-to-date data available.
How do the campaign fields work?
You insert placeholders in your message or template. This means that you indicate where and which information from the external system should be displayed.
Customer's company name: [automationfield:customerCompany]
Email address for invoice: [automationfield:invoiceEmail]
VAT number: [automationfield:invoiceVatNumber]
PO number: [automationfield:invoiceCharacteristic]
The following parameters can be used:
- Name: the name of the placeholder. For example: customerCompany
- Type: the type of value - this could be STRING, PRODUCTLIST or URL. If you do not specify a type, the default is "STRING"
- Values: the value that you specify. For example: Spotler. But it can also be a row of productIds when the type is a PRODUCTLIST.
Registration confirmation after a newsletter subscription
Immediately after a newsletter subscription in an external system, the contact must not only be added to Spotler with the correct permission, but the automation with the registration confirmation can also be triggered for the contact. With this, the respondent receives a confirmation of his subscription by e-mail. If a subscription confirmation is also sent from the external system, this must be disabled of course.
Abandoned Shopping Cart campaign
Many online stores have a mechanism that saves abandoned shopping carts. You can make good use of this to trigger the abandoned cart automation in Spotler.
When triggering this automation, the online store can send data from the shopping cart to Spotler. Information such as products, links, images and vouchers can be used as content of the e-mail message that is sent to the recipient. See Personalization in your automation message.
Show product details in a message
To show the products from the abandoned cart in the message, it is only necessary to provide the unique productIds. Spotler places the correct products in the message based on these Ids, because all necessary data is already available through the product synchronization. When a productlist block is added to an email message, the placeholder name will be “productlist” by default and the type will be “PRODUCTLIST” (in capital letters).
Show the shopping cart link in message
The link to the abandoned shopping cart can also be automatically placed in the message. For example, the placeholder can be “[automationfield:linktocart]”.
Product Review campaign
An automated Product Review campaign makes collecting valuable reviews really easy. As soon as a purchase has been made in the online store and this order has been set to the status Completed, the automation is triggered in Spotler. In the automation you can schedule the message to be sent 14 days after the trigger. The purchased products can be shown in the message. When a productlist block is added to an email message, the placeholder name will be “productlist” by default and the type will be “PRODUCTLIST” (in capital letters). The customer is asked to write a review for each product. Due to the separate product sync, Spotler already knows the link to each product's review page.