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:
| HTTP Method | Endpoint | Description |
|---|---|---|
| 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/offline | Send 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/offline | Send 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
| Field | Description |
|---|---|
| Site Key | ONE-NX8P2RSAAU-1813 |
| Touchpoint and Context | api://my.touchpoint/customer/interaction |
| Customer Key | my-customer-id |
| TID | Returned on first request |
Request
| Field | Description |
|---|---|
| Request Method | POST |
| Request URL | /one/oauth2/rt/api/2.0/interaction?sk=ONE-NX8P2RSAAU-1813 |
| Request Headers | Authorization 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 | |
Response
Expected response code
200 SUCCESSExpected response body
{
"statusCode": 200,
"tid":"dedc2983-4666-4641-8047-61250a878f89"
}