You are viewing an old version of this page. View the current version.
Occasionally, the need arises to use values created in one transformation in another transformation, for example, a sessionID returned from a login web service is required when calling subsequent web services for authentication purposes.
The need can also arise to use values created in one part of a transformation at a later stage in that transformation, for example, RecordNumber is initialized and incremented for every record inserted into a target to identify its item number.
Sometimes, we need to use values returned in one transformation in the definition settings of subsequent operations, for example, the URL setting returned by one transformation is used to set the Web Service URL of a subsequent web service call.
In all of these instances, you can use global variables to share the information in question with other parts of the operation or transformation. However, please note that global variables are only available for chained operations, that is, subsequent operations called from the operation that created the global variables using On Success and On Failure operation settings. Global Variables can also be used within the same transformation. See Using Global Variables for instructions to create global variables.
The following predefined API global variables are currently available in Jitterbit.
Looks at the payload/payloads submitted to the API. Note that for the majority of the APIs, you would only expect one plain payload and, as such,
If you expect multiple payloads to be submitted at once, using the URL-encoded form (also known as
Variable array used to dynamically iterate through all of the submitted parts of the payload/body (versus checking a specific part as with
Variable array used to dynamically iterate through all of the request headers (versus checking specific headers as with
|String||Variable array used to dynamically iterate through all of the multi-value parameters (as opposed to checking each parameter specifically as |
Variable array used to dynamically iterate through all of the submitted parameters (as opposed to checking each parameter specifically as
This sample script appends all of the provided parameters to a new variable for later display back to the user:
Variable used to look at the request headers submitted to the API; for example,
The URL that was called to trigger the Jitterbit OData or Custom API.
|String||The request method that was used to call the API.|
Looks at the multi-values of the parameter submitted to the API directly via the URL and returns the values as an array with a space between each value.
Example: for the URL then
Looks at the parameters submitted to the API directly via the URL; for example,
NOTE: Multi-value URL parameters will return a string delimited by "|||" (three pipe symbols). To return multi-value URL parameters as an array, use the
Example of multi-value parameters: for the URL
This variable needs to be set if your API is set to use a variable as the response instead of using the final target.
Used to set the response headers of the API; for example,
|String||Provides the ability to override HTTP response code for custom APIs via Jitterbit script variable. Set the |
Last updated: Aug 14, 2018
- No labels