◼️"Client action" event
Smartico has a special type of event called "Client action".
Such actions can be triggered from the front-end or through the REST API and can start real-time campaigns (Journeys), Automation rules, and progress/complete Missions or Badges.

How to trigger client action from the front-end
You can report a specific action done by the end-user, for example, when the user is clicking on the submit button on the cashier page, you can report the action 'CashierSubmitClicked'.
As soon as the action is defined and triggered at least once, you can build a real-time journey to react to such an action.

You can also pass additional parameters in the event, like
In the backoffice, in the Query Builder, you can validate the value of the event payload (read Query Builder article for more details about event evaluation)

Triggering a custom action through the URL (or any other deep link)
In some cases, you may want to start a campaign when the user reaches a specific page.
One option is to pass a special parameter in the URL of any of your pages.
For example, you can build a URL like:
When a user comes on this page, you can catch him with the campaign waiting for the "Core: client action" and action DEPOSIT_OPENED

Note: the passed parameter in our example is "dp:action&action=DEPOSIT_OPENED" which is "URL Encoded". You can also pass any other deep links that will be triggered automatically after the user is logged in. Deep links that open a URL (dp:go or any deep link with a url parameter) are ignored when passed this way.
Trigger client action through the REST API
You can send client action using a server-to-server approach using Smartico REST API.
You can find details of the REST API in Smartico BackOffice \ Tools \ Rest API (requires special permissions, as it contains secret keys that should be kept private).

The payload of the request should contain one required field called "client_action" and may contain any other information. The event payload may include links to reset the password, email verification, or whatever you decide.
For example, your payload may look like
To handle this event, you need to prepare a real-time campaign triggered by the "Client action" event with Client action = "reset_password" (or any other name you choose).
Within the campaign, you will send an email at the start. And inside the mail resource, you will write something like this
Another case, you want to inform the client that he got a cashback.
An example of email:
You can validate any parameters of the event payload in the Query Builder. See more details in the Event evaluation in Query Builder
Last updated
Was this helpful?