Programme Step - Raise Event

Programmes can raise events to be sent to the Intilery system. This can be done in two ways, detailed below.

Simple Input

The simple input method is used when both the event you wish to raise, and the event data will be the same regardless of who the programme is running for. 

In the above example, an unsubscribe event is raised for the customer, setting the Customer.Subscribed value to false. In this way, any customer on the programme would be unsubscribed if they reach this step. If the event being raised requires more values, they can be added by clicking the '+' button in the bottom left of the pane.

JS Function

For more flexible functionality, the Raise Event Step also allows you to use a JavaScript function to specify the event raised. This function takes two parameters: the programme data and the module data, which you can use to customise the event at runtime. For more details on Module Data, see Programme Modules.

Below is an example Javascript function which uses data from the Customer Module Data to customise a sign in event.

function(programmeData, customerData) {
    var event = {};
    event.eventName = 'Sign In';
    event.eventAction = 'sign in':
    var eventData = {};
    eventData['Customer.Email'] = customerData.Email;

    event.eventData = eventData;

    return event;

Any event that is modelled can be raised with whatever data is accessible via the programme or module data, provided that the returned object is of the form:

    eventName:[EVENT NAME],
    eventAction:[EVENT ACTION],
    eventData: {
        [PROP1 NAME]:[PROP1 VALUE],
        [PROP2 NAME]:[PROP2 VALUE],

As well as customising the eventData using module or programme data, it is possible to specify what event to send based on said data. Simply return different event objects dependent on whatever conditional data is relevant.

Still need help? Contact Us Contact Us