Push actions are a quick way of sending updates to customers, or keeping other services up-to-date with data changes in Custobar.
This guide helps you understand how to set up a push action from scratch, so that it is ready for users to start sending push campaign actions. In this guide, you will be defining a form for defining push action's content and an outgoing data targets for it.
The first step in creating a push action is to define the target for push messages. Custobar provides a flexible way of defining one or more target services, where the message are sent.
Follow these steps to set up a target service
Configuring the data target
To configure the target service for push actions, create a data target for Messages.
Fill out in minimum the name, description and request URL address. The name and description should be recognisable by the marketing managers, who daily create the push actions, so that they know which target service to send the message.
If you'd like to call multiple remote services at once, e.g. your CRM and a web app, you may define multiple target services. Upon calling the data target, Custobar will call each of the defined target services.
You may define custom headers, for example an authentication token to be used with your endpoint, the format, batch size and the wrapper document, should the items be grouped into batches.
After you're configured the data target the way your service has been set up, click Create to finish adding the data target.
Next, you'll be adding a push action form, which will help non-technical users in creating push messages, instead of writing raw JSON code.
The purpose of push action forms are to allow users to create push action content, without knowing how to write JSON documents.
The push action forms consist of a user fillable form, the default JSON document and a selection of applicable data targets, like the one created in the previous step. You may have multiple forms connected to multiple allowed endpoints.
Follow these steps to set up a push action form
Configuring the form, step 1
To configure the push action form, start by giving it an applicable name and description, so that users creating push action forms recognise the form its purpose. Check any outgoing data targets that are suitable for this form. The user will be presented with a choice of target services based on this list.
The message is the JSON document that is sent to the customer, modified by the push action form created in the next step. The message can contain placeholders using a double dash expression, for example --date--
. Add any keys here you'd like to have as default values or as static values. For example, to create a customer service ticket, you might want to define the following kind of JSON document.
{
"date": "--date--",
"recipient": "--customer_id--",
"message": {
"type": "Feature request",
"subject": "Hello, world!",
"body": "How is it going",
}
}
In the example, the date and customer_id strings are replaced by their actual values, whereas next we make the subject and the body properties of a message editable by our user. The type is a static value, which cannot be edited and is always sent as-is.
Configuring the form, step 2
To configure the form to allow editing of the JSON document defined in the previous step, follow these steps
All done! You've now set up your first push message and target service, to which the messages are to be sent.
The next step is to create an actual push action. To do that go to the Campaigns section, click Create action and choose "Push" as the action type. When completing the form, you'll be redirected to the push content editor, where you can pick the form and the target service, that you created in this tutorial.