โ—ผ๏ธ"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.

circle-info

In order to see the "Client action" value in the Smartico BackOffice, you need to trigger it at least once; the triggered value will appear within 30 minutes in Smartico BackOffice automatically.

You can also register "Client action" manually in the Smartico BackOffice \ Tools \ Properties. Search for "Client action" property and use the "+" sign to add an action.

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)

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=TEST5" which is "URL Encoded". You can also pass any other deep links that will be triggered automatically after the user is logged in

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).

Example of payload in the REST API request

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?