This page explains how to associate a payload-level custom script with a service, then run the service and check input and output payloads.
If this is the first time you are using this script, you are strongly advised to work with a test service and ensure everything syncs as expected before applying to live services.
In Patchworks, a test service can be created by defining test (rather than live) source and destination connectors which point to sandbox URLs for the associated systems.
Step 1 Use the services option to access an existing service that you'd like to update, or add a new service:
Step 2 If at least one payload-level custom script has been added, a payload script tab is available - select it:
Step 3 Click the select custom script field and choose the script that you wish to associate with this service - for example:
Step 4 Details for the selected script are displayed:
You don't need to do anything here - everything is ready to go. However, if you wish to update the script, click the modify this script button to edit the script in the manage custom scripts area.
If a script is associated with a service and subsequently edited and saved, changes are applied to associated services automatically.
Step 5 Use the add script to service button to apply changes.
Step 1 Select the run service tab:
Step 2 Scroll down to the service options section and toggle on the store custom script payloads setting:
Step 3 Set all other options as required and run the service:
Step 4 As the service runs, custom script activity is displayed in the the custom scripts logs section of the service log - for example:
Step 5 When the service run is complete and you opted to download custom script payloads, you can download these files using buttons in the custom script payload panel:
If you forget to download files at this point, a download link will be available in the service log for 24 hours. For example:
When a payload-level custom script is associated with a service, an edit script option is available on the service canvas. For example: