Profile creates granular customer segmentation with the aim of delivering more relevant experiences by seperating users into distinct groups based on their shared characterisitics.
Use this API endpoint to create a profile.
segmentId.user_id can be empty.An object containing a user id and optional dictionary of key-value pairs that represent data tied to the user.
| user_id | string User UUID (or any unique user id) specified by consumers. |
| user_properties | object Optional dictionary of key-value pairs that represent data tied to the user. You have access to this object in your Destinations. |
| segmentId | string Segment identifier |
{- "user_id": "foobar",
- "user_properties": {
- "firstName": "Foo",
- "lastName": "Bar",
- "email": "foo@bar.com"
}
}{- "error": {
- "error": {
- "message": "Bad request",
- "code": 404
}
}
}| user_id | string User UUID (or any unique user id) specified by consumers. |
| user_properties | object Optional dictionary of key-value pairs that represent data tied to the user. |
| segmentId | string Segment identifier |
{- "user_id": "foobar",
- "user_properties": {
- "firstName": "Foo",
- "lastName": "Bar",
- "email": "foo@bar.com"
}
}{- "error": {
- "error": {
- "message": "Bad request",
- "code": 404
}
}
}An interaction with an Item overrides variation_settings.
| profileId required | string profile identifier |
| source | string Identifier of an event source |
| event required | string unique event identifier. |
| variation_settings | object Optional dictionary of key-value pairs that represent variation settings for an event |
| occurred_at | integer Timestamp of the event in milliseconds since epoch |
object An item in a catalogue |
{- "event": "login",
- "variation_settings": {
- "country": "AU"
}, - "occurred_at": 1666807081
}{- "_id": "ofK1OSX8cK3MJI1oPEqQgqgasVtkXJEO",
- "event": "login",
- "user_id": "500c145f-4f41-4c00-8e6b-e35306f0fa71",
- "event_at": 1666807081
}Journey is a chain of events you wish to track and response in a segment. Journey can be either simple, containing only one event, or composite, a set of events with different orders and priorities. For example, in an ecommerce website, adding a first product to a wish-list is a simple journey while adding products to a shopping cart followed by a purchase is a composite journey. Additionaly, you can track and response to customer drop-offs. For instance, sending email to customers who has not logged in for three consecutive days.
Funnels can be created by chaining journeys. Every subsequent journeys target only the users who has completed the previous journey in a funnel. For example, only offer discount vocuher if a user has already signed up for the free trial of your SaaS product
{
title: '20-discount-voucher',
journeySteps: [
{
event: 'CTA clicked'
}
],
previousJourneyId: 'ID of free trial sign up journey'
}
Index is a number in an ascending order which determines the sequence of events. For example, an event with index 1 has to occure before the event with index 2. Steps with the equal index do not take precedence over each other but all needs to occure for a journey to progress.
[
{
event: 'login',
options: {
index: 1,
},
},
{
event: 'win',
options: {
index: 2,
}
}
]
Steps with equal index can progress as soon as one of the short circuit event happens and do not need to wait for other events with equal index to occur. For example, the win and lose have equal index which means both needs to occur for the journey to progress. However, because win is short curcuited, then even by occuring win the journey progresses.
[
{
event: 'win',
options: {
index: 1,
short_circuit: true
},
},
{
event: 'lose',
options: {
index: 1,
}
}
]
For situations when you need one event to occur multiple times with the same priority, frequency option can be used. For example, consider a scenario that you want a user login and follows by three consequitive wins.
[
{
event: 'login',
options: {
index: 1,
},
},
{
event: 'win',
options: {
index: 2,
frequency: 3
}
}
]
Events can have variations. For example, winning a game is an event but winning game X is one variation of that event. In CxSense, you can define as many variation as you need for an event.
[
event: 'win',
options: {
variation_settings: {
game: 'COD'
}
}
]
Additionally, you can define a variation that applies on ANY items in catalogues. For example, imagine your App has multiple games and the journey progresses by winning any games.
[
event: 'win',
options: {
variation_settings: {
catalogue: 'Game'
}
}
]
Drop-offs sets predefined response to any inaction by users. For example, sending an email to inactive customers who has not logged in for three consecutive days.
[
event: 'login',
options: {
dropoff: {
after: "3d"
}
}
]
The expiry parameter defines a time-bound condition for trigger validity within a user journey. It ensures that a specific trigger will only be considered valid if it occurs within a defined time window, starting from a specified reference point.
This reference point can be:
If the defined trigger (e.g., user_login) occurs within the specified expiryIn duration (e.g., 2 days) from the reference point, the journey will proceed to the next step. If the trigger does not occur within that time frame, the pathway is considered incomplete, and the journey will not advance.
[
event: 'user_login',
options: {
expiry: {
in: "2d",
from: "2011-10-05T14:48:00.000Z"
}
}
]
An object containing a journey details and journey steps
| title required | string |
| description | string |
required | Array of objects (journey_steps) |
| segmentId | string |
{- "title": "string",
- "description": "string",
- "journey_steps": [
- [
- {
- "event": "login"
}
]
], - "segmentId": "string"
}{- "_id": "500c145f-4f41-4c00-8e6b-e35306f0fa71"
}Destinations are the real-time callbacks of user progression in journeys. You can attach multiple destinations to a journey.
CxSense transforms your web/mobile application to a trigger machine. Triggers can be utilised in various automation and integration services like Zapier. Destinations are REST hooks. Learn in general how https://resthook.org work.
When you add a destination in CxSense, you can CxSense how to authenticate with that destination’s app or endpoints.
You can access your segment data object and users properties you provided in the payload of the requests to the destinations. If you do not provide data, then we send user and segment metadata object to the webhook.
let data = {
message: "{user.firstName} won {segment.gameTitle} game!"
}
An object containing a destination endpoint details
| title required | string |
| journeyId required | string |
| url required | string |
object | |
| method | string Default: "get" Enum: "post" "get" |
| data | object |
{- "title": "string",
- "journeyId": "string",
- "url": "string",
- "auth": {
- "bearer_token": "string"
}, - "method": "post",
- "data": { }
}{- "_id": "string"
}Run subscribed destinations for a journey for a user.
| destinationId required | string |
| profileId required | string A profile for a destination run |
{- "profileId": "string"
}{- "error": {
- "error": {
- "message": "Bad request",
- "code": 404
}
}
}| journey_title required | string |
| page | integer Default: 0 The number of pages to skip before starting to collect the result set |
| limit | integer <= 200 Default: 100 The numbers of items to return |
By default it returns the last 24 hours achievements of a journey.
| segmentId | string Identifier of a segment |
| start | integer Unix epoch time in milliseconds |
| end | integer Unix epoch time in milliseconds |
{- "start": 160987009765,
- "end": 160987009765
}{- "hits": [ ],
- "totalHits": 0
}| user_id required | string |
| page | integer Default: 0 The number of pages to skip before starting to collect the result set |
| limit | integer <= 200 Default: 100 The numbers of items to return |
By default it returns the last 24 hours achievements of a user.
| segmentId | string Identifier of a segment |
| start | integer Unix epoch time in milliseconds |
| end | integer Unix epoch time in milliseconds |
{- "start": 160987009765,
- "end": 160987009765
}{- "hits": [ ]
}Users can be categorised into distinct segments based on their behaviours and attributes.
The multi-tenant applications can use segments to define multi tenancy.
A JSON object containing a segment data
| title | string |
| description | string |
| settings required | object A set of rules to define a segment |
| metadata | object optional dictionary of key-value pairs that represent data tied to the segment |
{- "title": "string",
- "description": "string",
- "settings": {
- "clientId": "dp-2030"
}, - "metadata": {
- "clientName": "CxSense"
}
}{- "_id": "string"
}CxSense supports unstrcutured data for metadata and properties. However, some automation and integration services might need structured data like Zapier. Schema endpoint allows you to manage your schemas.
A JSON object containing a schema data
required | Array of objects |
{- "rule": [
- {
- "name": "string",
- "type": "NUMBER",
- "label": "string",
- "description": "string",
- "mode": "NULLABLE"
}
]
}{- "_id": "string"
}Catalogue is a collection of items or resources in your system. For example, in a weblog application, articles are defined in a catalogue. In CxSense, catalogue items are structured and require a schema.
CxSense can recommend the most relevant items in a catalogue to users to encourage engagement. Our proprietary AI recommender engine trains by user interactions and items in your catalogues.
Create a catalogue
| schemaId required | string Id of the schema for items in a catalogue |
| title required | string A unique identifier of a catalogue |
| recommender | boolean Default: false Sets AI recommendation for items in this catalogue |
{- "schemaId": "string",
- "title": "string",
- "recommender": false
}{- "error": {
- "error": {
- "message": "Bad request",
- "code": 404
}
}
}Items in catalogues are your resources. You can define them once and on every achievement have access to your resource fields.
Nominated fields in items can be used for traning CxSense recommender system.
Create an item
| catalogue required | string Catalogue unique identifier |
| id required | string A unique identifier of an item in your system |
| properties | object Default: "[object Object]" |
{- "catalogue": "string",
- "id": "string",
- "properties": { }
}| id required | string Item identifier |
| mode | string Default: "Quick" |
| type | string Default: "Item_to_Item" |
{- "mode": "Quick",
- "type": "Item_to_Item"
}{- "error": {
- "error": {
- "message": "Bad request",
- "code": 404
}
}
}Exchange your client_id and client_secret with an access token
| client_id required | string |
| client_secret required | string |
| audience required | string Value: "https://cxsense.io/api/v1" |
| grant_type required | string Value: "client_credentials" |
{- "client_id": "string",
- "client_secret": "string",
- "grant_type": "client_credentials"
}