Using the Customer Activity API

Follow the steps below to send customer activity data to MXO without creating an Interaction Point. In the following example we are going to use Dynamic Propositions and the Activity API to allow Customer First Bank to listen to customers interacting with their ATM machines.

We've made the Customer API publicly available on Github. You can find it here:

Customer API

Step 1 - Create an ATM Touchpoint

Create a base Touchpoint to reference where any customer activity originates from.

ATM_Example_Create_TP

Step 2 - Create ATM Activity Codes

Customer First Bank want to listen to Balance enquiry and Cash withdrawal activities. Create these activities in MXO and give them activity codes for use with the activity API.

ATM_Example_Create_AT

Step 3 - Create an ATMs Proposition

Dynamic Propositions are tracked as children of an existing Proposition in MXO . Any API calls must reference the existing parent Proposition as well as the code for the Dynamic Proposition to enable activity to be tracked correctly.

In our example, the Dynamic Propositions that represent each ATM location need to be tracked as children of a non-dynamic parent ATMs Proposition. To enable this tracking, create an ATMs Proposition.

DS - Create

Step 4 - Request a Valid OAuth 2.0 token

Request a valid OAuth 2.0 token from MXO to use the Activity API. Use your preferred API client to make the request, ensuring you provide the correct details.

Use the Client Credentials grant type when requesting an OAuth Token for the Data Export API.

For more information, see Request an OAuth 2.0 Token from MXO.

Step 5 - Send ATM activity to MXO using the Customer Activity API

POST /one/oauth2/rt/api/3.0.0/customer/ONE-PFSPTU3IYX-5263/activity
{
  "customerContext": {
    "baseTouchpointUri": "atm://atm"
  },
  "activities": [{
    "propositionCode": "atm",
    "dynamicPropositionCode": "atm-12345",
    "activityTypeCode": "balance_enquiry"
  }, {
    "propositionCode": "atm",
    "dynamicPropositionCode": "atm-12345",
    "activityTypeCode": "cash_withdrawl"
  }]
}

Step 6 - Verify that the Activity is tracked in Monitor

Configure Monitoring to monitor the TID returned from your request. This lets you confirm that MXO has tracked customer activity correctly.

Navigate to Test > Monitor in MXO to configure monitoring.

DS - Create

Step 7 - Use ATM Activity in an Eligibility Rule

Create an Eligibility Rule to check if the customer has withdrawn cash recently by finding the most recent withdrawal from any ATM.

DS - Create

Create a second Eligibility Rule, referencing the first, that checks if the date of the most recent cash withdrawal is in the last 14 days.

DS - Create