Содержание

Creating a scenario

The Scenario wizard provides a visual canvas for building communication logic with contacts through dragging and dropping blocks and connecting them with communication lines.

Canvas

To create a scenario, go to MailingsScenarios. Once the name of the scenario has been set, you will be taken to the canvas on which you need to place the blocks.

On the canvas you can find various tools that can help you when working:

In addition to the navigation tools, several other useful functions are available:

Blocks

Block settings are on the right sidebar. Drag a block onto the canvas and double-click to open the settings.

It is mandatory to create at least one starting and ending block for each scenario. The rest of the blocks can be combined at your discretion and tasks.

The starting block is the event that must occur for the contact to start going through the scenario. You can use multiple starting and ending blocks within a single scenario. An important setting for the initial block is “Duplicate Handling”. It regulates the behaviour of the scenario in case the same contact starts the scenario without having completed the previous walkthrough yet. Be careful, because if you use several initial blocks, this setting will be synchronised and applied in each of them.

Starting blocks

Main blocks

Finishing block

If your scenario includes a final block of deleting a contact or unsubscribing it from all mailing groups immediately after the block with sending a message, we recommend to put a small pause between these two blocks. Mailers do not always process requests to send messages instantly, so it may happen that a contact is deleted or unsubscribed from groups before the message is sent to them.

Creating a contact at scenario start

By default, the scenario start request will only work for a contact that already exists in the database (similarly, a deleted contact will not be restored and will not start the scenario). The settings of the “API” starting block will allow you to pass a new contact (doesn't exist in the database) to the scenario (it will be created, if it was not found and the scenario for it is started).

How the contact creation setting works:

Note: if a new, previously non-existing identifier is passed for an existing (or deleted) contact - it will not be added to that contact. If you need merging logic, use any API request to create a contact that provides a method parameter (for example) before requesting to run a scenario with that contact

.

Rules for creating new contacts via API starting block

When the creation setting is active, any contact sent by API request is first of all checked for existence in your account database. If the contact was not found in the database, it is then checked for its presence among the deleted ones, and if no matches were found there, a new contact is created in enKod and the scenario is run with it.

Globally, identifiers are necessary to search for a contact or create a new one:

Contact does not exist (and is not deleted)

Contact in the list of deleted contacts

If a deleted contact is passed - it is restored and the scenario with it is run. Contact recovery rules:

At least one contact identifier is in the database or in the list of deleted contacts