When a multi-API business session runs during a stress test, subsequent APIs often depend on values returned by earlier ones -- for example, passing a product ID from a "browse" API to "add to cart" and "checkout" APIs. A parameter command instruction redefines data export parameters and response parameters of the previous API, storing the result as a reusable parameter for all downstream APIs in the same session.
How it works
A parameter command instruction sits between two API nodes in a business session. It takes a response parameter or data export parameter from the preceding API, applies an expression to redefine the value, and stores the result as a new parameter. All subsequent APIs in the session can reference this parameter by name.
Key behaviors:
A business session supports multiple parameter command instructions.
Parameter command instructions operate on response parameters and data export parameters only. They cannot process global file parameters or global custom parameters.
Add a parameter command instruction
This section walks through a concrete example: extracting the first five characters of a product ID returned by one API and passing the extracted value to subsequent APIs.
Example scenario
The business session contains three APIs:
| Order | API | Role |
|---|---|---|
| 1 | Browse a product | Returns a product ID in its response |
| 2 | Add the product to the shopping cart | Needs the product ID from API 1 |
| 3 | Complete the payment | Needs the product ID from API 1 |
Prerequisites
Before you begin, make sure you have:
A PTS stress testing scenario with at least two HTTP APIs configured in a business session
Response parameters configured on the preceding API (see Operation response parameters)
Procedure
Log on to the PTS console, choose , and then click PTS.
Create and configure the three APIs: browse a product, add the product to the shopping cart, and complete the payment. For details, see HTTP APIs.
Configure response parameters for the browse a product API so that the product ID is available for extraction. For details, see Operation response parameters.

In the Business Session section, expand the Add Instruction drop-down list and select Parameter Command.
Expand Parameter Command and configure the following fields:
Parameter Name: Enter a name for the new parameter, for example,
ShortProductID.Parameter Logic: Enter the expression that extracts the value.
In this example, enter the following expression to extract the first five characters of the product ID:
_${sys.substring("${ProductID}", 0, 4)}_Component Description ${ProductID}References the response parameter defined in the business session sys.substring(..., 0, 4)Extracts characters at index positions 0 through 4 (five characters total, zero-indexed) _..._Wraps the expression for evaluation 
Usage notes
To pass multiple values between APIs, add multiple parameter command instructions, each defining a separate parameter.
Related topics
HTTP APIs -- Add and configure API nodes in a business session.
Operation response parameters -- Define response fields to capture from an API.