Asynchronous Trigger a Custom Event

Use the following API to asynchronously trigger a specific custom event. The Responsys Program orchestration will use the existing members of a profile list that are specified in the API request.

NOTES:

  • A single request is limited to 200 recipients. If you need to trigger a custom event for more than 200 recipients, then you should submit multiple requests to trigger the custom event.
  • Responsys requires Enactment Batching feature to be enabled for the account when using trigger custom event with mobile app campaigns in Program. Otherwise, the mobile app campaign events in the program will not be processed. However, there are some tradeoffs to consider before enabling the feature. Please refer to How Enactment Batching Affects Processing for more details.

    If you have the Real-time Events feature enabled for your account, and you need to send near-real-time messages based on the custom event, then ensure that the custom event you specify is of type Real-time. The Get Custom Events API does not return custom event types in its response, but you can view the custom events and their types by accessing the Define Custom Event Types page in the Account administrator section of Responsys. Contact the Responsys Account Administrator for assistance if you do not have access. For more information, see the Defining Custom Event Types topic in the Oracle Responsys Help Center.

    When Enactment Batching is used, the Responsys Account Admin must check the “Include Mobile App Channel RIIDs” check box for the custom event’s definition. (In Responsys, this setting is found in Accounts > Account Customization > Global Settings > Define custom event types). With this option set, Responsys creates an enactment for each device associated with every Profile RIID; otherwise, the Push channel enactments will NOT enter the program and by extension, it will not send any push messages to the intended recipients. To avoid duplicate emails when email is part of the orchestration, marketers who orchestration the program must add a data switch immediately before the Email event.

  • The Profile List parameters that can be specified are one of recipientId, emailAddress, customerId, or mobileNumber. The system processes the attributes in the above-listed order and accepts the first non-null value found.
  • To pass extended/accented characters in optionalData payload, they must be escaped as Unicode characters. For example, the euro symbol € is escaped as \u20AC, the yen symbol ¥ is escaped as \u00A5, an ü is escaped as \u00FC, an é is escaped as \u00E9, and the like. Otherwise, you may receive an INVALID_REQUEST_CONTENT error.
  • Sending duplicate names in the recipientData results in an error message (MULTIPLE_RECIPIENTS_FOUND).

Note: The Asynchronous API is generally available for all Responsys customers.

Service URL:

/rest/asyncApi/v1.3/events/{eventName}

Required Path Parameter:

eventName - Name of the custom event defined in Responsys.

Request Method:

POST

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Sample Request Body:

{
  "customEvent": {
    "eventNumberDataMapping": null,
    "eventDateDataMapping": null,
    "eventStringDataMapping": null
  },
  "recipientData": [
    {
      "recipient": {
        "customerId": 1,
        "emailAddress": null,
        "listName": {
          "folderName": "WS_REST_SAMPLE",
          "objectName": "wsrest"
        },
        "recipientId": null,
        "mobileNumber": null,
        "emailFormat": "HTML_FORMAT"
      },
      "optionalData": [
        {
          "name": "CUSTOM1",
          "value": "value1"
        }
      ]
    }
  ]
}

Sample Response:

{
  "requestId": "MGkybHBZOjoxNjIwMTI3ODA0",
  "apiName": "asyncTriggerCustomEvent",
  "status": "REQUEST_ACCEPTED",
  "links": [
    {
      "rel": "self",
      "href": "/rest/asyncApi/v1.3/events/webservices",
      "method": "POST"
    },
    {
      "rel": "asyncResponse",
      "href": "/rest/asyncApi/v1.3/requests/MGkybHBZOjoxNjIwMTI3ODA0",
      "method": "GET"
    }
  ]
}

Learn more

Asynchronous API resources