Payload Variables

Request variable contains the request payload. Response variable contains the generated response payload.

Request Payload

Only one variable is related to the request itself - input (also has the request alias). The variables contain the request payload itself.

Examples:

Usage Example
Quering request’s XML payload for value $input//*:AccountId/text()
Quering request’s JSON payload using Javascript input.header.account.id
Quering request’s JSON payload using JSONPath $..id

Response Payload

After the response payload is formed, the scripts can use the output variable, also aliased as response, which contains the generated response payload.

A value calculated in the payload can be used in delays, response headers and accounts update scripts to produce a consistent response. The variable is not available to the reaction matcher and accounts selector scripts because the response is not yet generated at that point.

Examples:

Usage Example
Quering reaction’s XML payload for status $output//*:Status/text()
Quering reaction’s JSON payload using Javascript response.status.code
Quering reaction’s JSON payload using JSONPath N/A. At this time, JSONPath is only executed against the request payload