Docs

How To

Propensity can be used on both the client-side and server-side of a web platform - infact, it can be used almost anywhere you have a customer id and the ability to make a http request.

The following is an quick-start example for a Node.js + React frontend setup. More endpoints are doumented on the Endpoints page for more custom integrations.

Node.js

Generate an access token

In order to retrieve responses from the Propensity API, you must include an access token in an "accesstoken" header with each HTTP request. Access tokens can be generated and/or copied from the 'Access Tokens' tab within your dashboard.

Create a score

Create a score for a specific user against a given metric. The userId used here should be unique to that user within your platform.

Increase a score

After a positive action taken by the user, increase the score for a given metric

Retrieve metric scores

Get all metric scores associated with a userId. These scores can then be used within your platform to personalise your customer's experience.