In a campaign, you add triggers that send messages to customers when the trigger's conditions are met. In the trigger, add conditions that point to a state of transaction. For example, choose a condition that triggers a message when a user makes a booking on your site, and the booking event is a part of transaction that you can identify using its transaction ID. This lets our platform link an event to a transaction. And when the event occurs, our platform can look up the entire transaction -- leading up to the event -- and trigger the linked message as a state of the transaction.
For instance, you may want to send a booking review reminder only if the user has not reviewed it already.

Example:
This is how a sample transaction event looks like, apart from appending the existing attributes from the event we infer some additional attributes too.
For each event we receive, we infer the following attributes:
- status - lets you know whether your received an event Ex: purchase_status
- timestamp - this is the timestamp when when you received an event Ex: purchase_timestamp
- transaction_state - the most recent event received: Ex: cancelled
Sample use case
You can a look at the following use cases to model a hotel booking journey using transactions. There are multiple steps to an entire transaction that a user has with the booking of a hotel. In some cases, the steps are:
- Booking a hotel
- Cancelling a booking
- Checking in
- Checking out
- Escalations
- Customer feedback
{
“bookings”: {
“events”: [
“purchase”,
“booking cancelled”,
“checkin”,
“escalations”,
“checked out”,
“customer_feedback”
],
“identifier”: “bsft_transaction_uuid”
}
}
- On the Blueshift app, create an event triggered campaign. (On the campaigns page, click +CAMPAIGNS > Event Triggered > Specify a name for identification purpose and click Create Campaign.)
- On the campaign creation page, we specify that a campaign starts when a user adds a hotel booking to the cart.
- To send an email when a specific aspect of a transaction occurs, add a trigger to the campaign. The trigger sends an email when the following conditions are met:
- When your customer checks out a booking, and
- You specify that the transaction type is orders
In the trigger details, add the following conditions:
The transaction condition ensures that when a user enters performs a checkout, the event is linked to a transaction.
- Similarly, you can add multiple triggers to the campaign so that when a user performs something specific, the event that occurs is linked to the transaction.
If you take a look at the conditions of the trigger, the transaction's condition is added to it. You can add this trigger to the campaign in case a user adds a product to the cart but does not checkout. This ensures that you can use the transaction to contact the user if the user adds a product to the cart but does not purchase it.
Using the transactions conditions, and specifying a transaction ID, you can link all the steps of a hotel booking journey to convert an interaction on your site to purchase.
Following sections show the event JSON our platform receives when a user goes through the steps of booking on your site.
1. Purchase Event
- JSON
{
"email": "test@test.com",
"event": "purchase",
"_bsft_transaction_uuid": "order-testxyz",
"timestamp": "2017-05-15T05:18:35Z"
}
Inferred Transaction Event
- JSON
{
"email": "test@test.com",
"event": "bookings",
"_bsft_transaction_uuid": "order-testxyz",
"purchase_status": true,
"purchase_timestamp": "2017-05-12T04:18:35Z",
"timestamp": "2017-05-12T04:18:35Z",
"transaction_state": "purchase"
}
- JSON
{
"email": "test@test.com",
"event": "cancelled",
"_bsft_transaction_uuid": "order-testxyz",
"timestamp": "2017-05-17T07:18:35Z"
}
Inferred Transaction Event
- JSON
{
"email": "test@test.com",
"event": "bookings",
"_bsft_transaction_uuid": "order-testxyz",
"purchase_status": true,
"cancelled_status": true,
"purchase_timestamp": "2017-05-12T04:18:35Z",
"cancelled_timestamp": "2017-05-17T07:18:35Z",
"timestamp": "2017-05-17T07:18:35Z",
"transaction_state": "cancelled"
}
If you see, we receive the transaction ID in each event. Our platform sends the campaign email when the step of the campaign journey that meets the condition of the event (that's linked to a transaction) is triggered.