Pre-request scripts allow you to modify request parameters before sending the actual request. For example, you may wish to set dynamic values, add headers, or adjust the standard request body based on specific conditions.
Post-request
scripts are written and deployed in the usual way, via the custom scripts option.
When a pre-request
script is added to an endpoint, it is applied wherever that endpoint is used in process flows. If your pre-request
script should only be applied to specific flows, we recommend creating a new iteration of the endpoint. For more information please see: Using a pre-request script for some process flows but not others.
Endpoints configured with the body format
set to form
and sending data as files (i.e. defining a file as a key value) cannot use pre-request scripts.
Any script you want to apply must be created as a custom script first.
Step 1
Select the pre-request script
tab for your endpoint:
Step 2
Click in the select a script
field and choose the script that you want to use - for example:
All scripts created for your company are available for selection.
Step 3 Choose the script version that you want to use:
If your script is updated in future, remember to come back here and (if appropriate) select the later version.
Step 4
Review the script code to be applied, then click the save and go back
button:
If you need to change the script code, this should be done in the custom scripts area, then (if appropriate) come back in and update the script version here.