Crisp lets you push events from the Crisp chatbox. If, however, you'd like to push those events from your backend instead, there's a way to do it via the Crisp REST API. This article explains how to do so.

First of all, you need to connect your backend to the Crisp APIs. Read this introduction article on how to do it.

Once you are done, you will follow this integration process (explained in details below):

Your backend can reach the Crisp APIs
In order to push an event to an user profile in your website, we need their people_id (ie. profile identifier)
To fetch the people_id we can look it up using the user email
Once we have the people_id we can push an event for that user

Okay! Lets proceed now.

Fetch the people identifier for email

Given the target user email is known to your backend, you will need to resolve the people_id for that email.

We advise that you store the people_id in your database, when the profile gets created. For instance, you may get the people_id from the conversation with the user, as explained in the docs for the conversation route.

Once you have acquired that people_id (eg. the first time the user chats with you), store it in your database for later re-use.

You may also lookup for the people matching the email you have using the people profile list route. Though, this is less convenient.

Push the event to the user profile

Now that the people_id is in your database for your users, you may push an event by submitting an event data:

"text": "basket:item:added",
"color": "blue",

"data": {
"product": "iPhone X"

As a HTTP POST to the following route: /website/{website_id}/people/events/{people_id}

This route is explained in the docs for the people profile event route.
Was this article helpful?
Thank you!