Using Business Events

Last updated:

Prisma Campaigns offers the opportunity to initiate processes or communications with clients in response to certain business-related events. By calling an API, it is possible to trigger campaigns for specific people automatically as follows.

Creating a Business Event

As a first step, it is necessary to create a business event within the context of an application. It is worth noting that the scope of the event will be defined exclusively within that application. To do this, go to Settings/Applications and click on the Edit Application button in the desired one.

Next, in the Business Events section, the Add new button allows you to add the required events by entering a name and a description in the fields denoted by event name and description, respectively.

After adding all the events in the application, press Save to apply the changes.

Associating a Business Event With a Campaign

The next step is to associate the newly created business event with a given campaign. To do this, go to Campaigns and click the campaign in question, activate the Business Events switch within Leads, select the business event from the drop-down list, and click on ADD. You should repeat this process for all the business events you want to associate with the campaign.

By using a business event in a campaign, you can only reach customers who belong to the segment used in that campaign..

It is possible to assign the same business event to multiple campaigns and for the same customer to qualify for several of these campaigns at the same time. When this customer performs an action that triggers a business event, Prisma Campaigns will execute the appropriate campaign given as defined in Orchestration/Prioritization.

Configuring the Funnel

When a customer does something that triggers a business event, Prisma Campaigns initializes the campaign funnel. This action occurs in the backend, so the first step should not require any interaction with the client.

You can use the following types of funnel steps in this stage:

  • Email
  • Push Notification
  • SMS
  • WebService

Filtering on Business Events (Optional)

For a given business event, it is possible to filter which customers you want to reach in the subsequent execution. To achieve this goal, you can refine the segment(s) associated with the campaign in question by clicking on the 3-point icon and selecting Filter in the corresponding row:

After this, the filter view will prompt you to select the desired conditions. Once you complete this, you will see the Filtered tag where All Segment used to appear. By clicking there, it is possible to check the filtering conditions, edit them, or remove the filter:

Using Context Parameters (Optional)

It is possible to define context parameters while sending the request that triggers a business event. You can use these in the body of emails or SMS messages. For example, by adding "context": {"param1": "Your loan payment period has expired", "param2": "customer support"} } to a request in JSON format, you will be able to utilize the client variables {{param1}} and {{param2}}. These variables will be replaced by the text strings Your loan payment period has expired. and customer support in the corresponding message.

The image below illustrates the use of context parameters in an SMS. That message will be orchestrated through the triggering of a business event:

You can find more examples of how to build requests with context parameters in the Examples of business event executions section below.

In addition, you can also use the special variables {{event-name}} and {{event-description}} in email and text messages, which represent the name of the business event and its description, respectively.

Examples of Business Event Executions

For more information on how to use the API, refer to the Business Events section in the Prisma Campaigns user manual. The following examples illustrate the execution and the server response using the JSON format.

  • Without context parameters:
{ "app-token": "0162c0cb-05ae-421a-bfaf-2138f41f5f83",
  "event-name": "PaymentExpired",
  "customer-id": "ISA-H900" }

Python implementation:

import requests as r
import pprint as pp # Visualization purposes

base_url = 'https://bankofholland.com:443'
business_events_api = '/api/campaigns/business-event'
url = base_url + business_events_api

json_data = {
	'app-token': '0162c0cb-05ae-421a-bfaf-2138f41f5f83',
	'event-name': 'PaymentExpired',
	'customer-id': 'ISA-H900'
  }

response = r.post(url, json = json_data)

# Validate response status code and body
print(response.status_code)
pp.pprint(response.json())

Output:

  • With context parameters:
{ "app-token": "0162c0cb-05ae-421a-bfaf-2138f41f5f83",
  "event-name": "PaymentExpired",
  "customer-id": "ISA-H900",
  "context": {"param1": "Your loan payment period has expired.", "param2": "customer support"} }