Interaction API

The Interaction API allows you to:

  • Track customer activity from your touchpoint solution.
  • Update customer profile data stored in MXO.
  • Receive optimized content responses for the best conversation to have with a customer.
  • Buffer requests to support offline mode and to reduce network calls.

Authentication and authorization

MXO security framework uses OAuth 2.0 for authenticating access to data. For detailed information on how to create API credentials for a user and request an OAuth 2.0 token from MXO, see MXO API security.

Endpoints

The available endpoints and methods are:

Important: Offline Interaction endpoints were deprecated and replaced by the new Batch Interaction API.
HTTP MethodEndpointDescription
POST/one/oauth2/rt/api/2.0/interaction/Send information about customer interactions to MXO in real-time. Use POST when you want to return optimizations in the response or when you want to register activity immediately.
PUT/one/oauth2/rt/api/2.0/interaction/Update the customer profile with details of captured and tracked activity. No optimizations are returned to customers.
PUT/one/oauth2/rt/api/2.0/interaction/offlineSend individual historic offline interactions to MXO. No optimizations are returned to customers. You must provide the timestamp when the customer interaction occurred. If interactions are being buffered by the touchpoint, for example, if a mobile device goes offline for a short period of time, the timestamp relates to time at which the interaction occurred and not the time the interaction was flushed to MXO.
PUT/one/oauth2/rt/api/2.0/interactions/offlineSend multiple offline interactions to MXO. No optimizations are returned to customers. Use to buffer multiple activities into a single request to MXO when you need to reduce network traffic or buffer activity when offline. This API supports a maximum of 100 offline interactions per call.

Example use case — Tell MXO about a customer interaction on a touchpoint

You want to record details in the AEP about a customer interaction on a touchpoint.

Parameters

FieldDescription
Site KeyONE-NX8P2RSAAU-1813
Touchpoint and Contextapi://my.touchpoint/customer/interaction
Customer Keymy-customer-id
TIDReturned on first request

Request

FieldDescription
Request MethodPOST
Request URL/one/oauth2/rt/api/2.0/interaction?sk=ONE-NX8P2RSAAU-1813
Request HeadersAuthorization header: HTTP Basic. Generated using the credentials supplied for the request, encoded in Base64. Example: Authorization: Basic MmU4ZmVjMGUtMzRmYi00ODUxLTgwMGUtOTk4OTMzMWU1NWQ yOmQ3ZjQ0ODRmLTk4MTctNDc3OC05MTYxLTZlYjA2ZDFmNmNmNw== Content-Type: application/x-www-form-urlencoded
Request Body
{
   "customerKey":"my-customer-id",
   "uri":"api://my.touchpoint/customer/interaction"
   }

Response

Expected response code

200 SUCCESS

Expected response body

{
   "statusCode": 200,
   "tid":"dedc2983-4666-4641-8047-61250a878f89"
}