Invoke API
RCS MO Parameters and Examples
content
and a postBack
MO using the customerData
parameter.
RCS content and postBack MO examples
The following example shows an MO using the content
parameter, where the end user responds with the keyword STOP. STOP is matched against a list of provisioned keywords. When matched, the MO is forwarded on to the endpoint.
content MO example
{
"rcsMoMessage":
{
"version":"2",
"campaignId":"CAMTNDTBDY",
"customerAccountId":"000-000-121-17842",
"submittedDate":"2019-11-11T10:43:48.000Z",
"moMessageId":"4d3ceea4-cf17-4655-87a5-136382abd3d3",
"sourceAddress":"447795022812",
"destinationAddress":"447786205277",
"content":"Demo Test"
}
}
In the following postBack
example, an end user has clicked a button in the RCS message to take them to a website. The customerData parameter, UserClickOnWebsite, is matched against a list of provisioned values. When matched, the MO is forwarded on to the endpoint.
postBack MO example
{
"rcsMoMessage":
{
"version":"2",
"campaignId":"CAMTNDTBDY",
"customerAccountId":"000-000-121-17842",
"submittedDate":"2019-11-11T11:48:02.000Z",
"moMessageId":"869549e0-59a4-428b-b83f-9dc74449e924",
"sourceAddress":"447795022812",
"destinationAddress":"447786205277",
"postBack":{
"mtRequestId":"012-W030J-0DL8R-10201-JWS24-PSI"
"customerData":"UserClickOnWebsite"
}
}
}
RCS message format fields
This table describes both the content and postBack parameters.
Note: Any leading or trailing whitespace in a parameter value will result in an error.
MO parameters
Parameter |
Description |
---|---|
rcsMoMessage |
MO message wrapper. Type: string. Required: Yes Multiple allowed?: No
|
version |
Used to indicate OpenMarket's RCS MOs version. Type: string. Required: Yes. The only supported value is 2. Multiple allowed?: No |
campaignId |
Unique global campaign identifier. This campaign ID is associated with the account ID.
Type: string. The minimum number of characters is 1, the maximum is 32. Required: Yes Multiple allowed?: No |
customerAccountId |
The IDS customer account ID.
Type: string. The minimum number of characters is 1, the maximum is 17. Hyphens (-) and underscores (_) are allowed. Required: Yes Multiple allowed?: No |
submittedDate |
The time and date that OpenMarket received the MO message from the MaaP. The submitted date is expressed in ISO 8601 date and time format with an offset from UTC. The date string is in the following form:: YYYY-MM-DDTHH:MM:SSZ Example: 2019-09-01T12:34:56.012Z Type: string Required: Yes Multiple allowed?: No |
moMessageId |
The unique identifier of the OpenMarket RCS MO message.
Type: string. The minimum number of characters is 1, the maximum is 64. Hyphens (-) and underscores (_) are allowed. Required: Yes Multiple allowed?: No |
sourceAddress |
The message originator from which the RCS message was sent. Type: string. The minimum number of characters is 1, the maximum is 64. Hyphens (-) and underscores (_) are allowed. Required: Yes. The value must be between six to 20 characters in length. Alphanumeric strings can use the characters A-Z, a-z, and 0-9. Long codes, landlines, VMNs, and toll-free numbers must include the country code. However, do not include a plus "+" character. For example,
Multiple allowed?: No |
destinationAddress |
The name or phone number associated with the bot receiving the message. Type: string. The minimum number of characters is 1, the maximum is 36. Hyphens (-) and underscores (_) are allowed. Required: Yes. it should be one of the following:
Alphanumeric strings can use the characters A-Z, a-z, and 0-9. Long codes, landlines, VMNs, and toll-free numbers must include the country code. However, do not include a plus "+" character. Multiple allowed?: No |
content |
Text content of the MO message for a free text reply.
Type: string. Must be formatted using the UTF-8 character set. The minimum size is 1 byte, the maximum is 8192 bytes. Required: Yes, if a free text MO. No, if a postback MO. However, it must be one or the other. For more information on using keywords in a free text reply, see Using auto-response for a free text keyword reply. Multiple allowed?: No |
postBack |
Parameter returned for a postback MO only. Type: JSON object. Required: Yes, if a postback MO. No, if a free text MO. However, it must be one or the other. Multiple allowed?: No |
mtRequestId |
Parameter returned for a postback MO only. This identifies an MT request. Type: JSON object. Required: Yes, if a postback MO. Multiple allowed?: No |
customerData |
Parameter returned for a postback MO only.
Type: string. Must be formatted using the UTF-8 character set. Required: No. The information returned in the MO is dependent on what was passed in the message. See Using the customerData parameter for actions and suggestions for more information on using this parameter in an RCS message. Multiple allowed?: No
|
Responding to the request
When you receive an OpenMarket MO message request, return an HTTP 200 or 201 response with an empty response body. OpenMarket will retry the request if it does not receive a response from your platform, or receives a non-200 response. You will need to make sure that you filter duplicate requests.
If there are any errors receiving the request, please use standard HTTP error response codes.