Programme Step - Query Data

This step will query customer data from the customer's behaviour graph stored within the Intilery platform.

Uses

This step is typically used to find event data for a customer where you do not have the id of the event. If you do have the id of the event then you should use the Find Entity Step

Step configuration

Property Description
Event The event to query for - events should be modelled from the visit entity, i.e. "View Product", "Checkout" etc.
Use Full Customer History
When ticked the step will search the complete history of the customer, otherwise just for the session that the programme was triggered for
Sort Field
How to sort the results, this should be a property of the entity, typically you will use "happenedAt" for events
Sort
asc / desc - asc for oldest to newest, desc for the reverse with most recent first
Session
Which session to search. Customers first session, last session, or all sessions
Limit
Maximum number of entities to return
Offset
The offset in the results returned
Function
A javascript function that must return a datamap. Each of the values in the returned datamap will be added to the programme data
e.g.
function(programmeData, result){
    if(result && result.length > 0) {
        return result[0];
    }
}
		

Results

The properties of the object returned from the function will be merged into the programme data.

E.g. for the Search event, the programme data would look like the following after execution, where "Text" is a property of the Search event

{
    "__trigger": {},
    "createdAt": 1460397108533,
    "session": 1460394871224,
    "Text": "koreaan"
}

Still need help? Contact Us Contact Us