Skip to content

Latest commit

 

History

History
85 lines (76 loc) · 3.04 KB

File metadata and controls

85 lines (76 loc) · 3.04 KB

Postback Consequence Detail Definiton

For more information about Consequences and associated Detail Objects, see Defining Rules.

Object Details

Friendly Name Key Type Description
Destination URL templateurl string Required. Destination URL to which the postback signal will be sent.
Request Body templatebody string

Optional. A string that contains the post-body to be sent. If this value exists, the postback will be sent as a POST, instead of a GET, request.

Tip: If necessary, the string should be appropriately json escaped.

Content Type contenttype string Optional. If this value exists, the postback will be sent as a POST, instead of a GET, request. If the value is not supplied, but a request body is found, the default is application/x-www-form-urlencoded.
Connection Timeout timeout number Optional. Timeout for postback connection in seconds. The default value is 2.
## Usage Examples

The objects in the following usage examples are full Consequence Objects that contain the detail definition on which this document focuses.

Simple Postback

{
    "id"        : "48181acd22b3edaebc8a447868a7df7ce629920a",
    "type"      : "pb",
    "detail"    : {
        "templateurl" : "https://www.endpoint.com/{%~sdkver%}"
    }
}

This postback sends the payload {“jsonkey”:“jsonvalue”,“sdkkey”:""}. The expansion will be replaced with the SDK version at time of postback. For more information, see Matching and Retrieving Values by Keys.

{
    "id"        : "9d40f5665d5bdbe96dcb3a24f4e4fe98d686a602",
    "type"      : "pb",
    "detail"    : {
        "templateurl"   : "https://www.endpoint.com/post/{%urlenc(~sdkver)%}",
        "templatebody"  : "{\"jsonkey\":\"jsonvalue\",\"sdkkey\":\"{%~sdkver%}\"}",
        "contenttype"   : "application/json",
        "timeout"       : 5
    }
}