Comment on page
Custom scripting
'Out of the box', Patchworks pulls data from a source system and pushes it into a destination system, using field mappings to decide where each item of source data should be placed in the destination system.
Patchworks provides default mappings which can be adjusted if needed, and a comprehensive set of transform functions that can be used if your source data doesn't quite slot neatly into the destination.
However, requirements for manipulating source data can be more complex than any standard set of transform functions can handle. If this is your position and you have developer experience in-house, custom scripting can be used to write and maintain your own scripts.
Scripts can be applied at two levels:
Script Level | Summary |
---|---|
Field | The script is applied to individual field mappings as a transformation. If you use process flows, this is done via the map shape. If you use services, this is done via the service mapping tab. |
Payload | The script is applied to a payload, so data can be manipulated before being sent for onward processing. If you use process flows, this is done via the script shape. If you use services, this is done via the service payload script tab. |
Using our integrated editor with IntelliSense, you can get as complex as you need with a choice of coding languages.
The following coding languages are currently supported for custom scripting:
Language | Version(s) |
---|---|
C# | 8.0 |
Javascript | Node 18 |
PHP | 8.1 |
Python | 3 |
Ruby | 3 |
Default packages are available for supported coding languages. Additionally:
Language | Package/library | Version | Summary |
---|---|---|---|
Javascript (JS Node) | jsrsasign | ^10.8.6 | For encryption and JWT support. |
| xml-js | ^1.6.11 | For XML support in javascript functions. |
PHP | phpseclib/phpseclib | ~3.0 | For connecting to SFTP/SSH and various other secure connection types. |
If you require additional libraries you can:
- embed them in your script directly
- submit a request to Patchworks support for a library to be included globally
Last modified 1mo ago