Importing and exporting Call external API scripts

You have the option to export and import a Call external API script.

  • When you export a script, it is reformatted as a JSON string. You can import this file in another environment. For example, you can export your script from a test environment and import it in your production environment. However, you must convert the string to JavaScript if you’re exporting it to continue working on it in your preferred development tool. This is native support in Javascript for converting JSON to an Object and an Object to JSON.

  • This is the recommended way to manipulate JSON in Call External API.

  • When you export from one Orange Logic environment and import to another, you must reconfigure environment-specific references. For example, if you included notifications in your script, these reference a specific user ID. When you import the script to another environment, you must reconfigure the notifications so they reference user IDs specific to the new environment.

    💡

    Tip

    You can deactivate notifications before you export a script. Then, activate and configure notifications in the new environment.

Export and import options

Export and import options

Alternatively, you can copy the JavaScript into another development tool or copy from the export window and paste to an import window in another environment.

📘

Note

If needed, you can use these methods to move configuration from custom buttons, FlowSteps, and other features to the workflow design tool. You can also run the JSON string format of your script in Swagger or another API client for testing purposes.

Script for a Call external API call in Swagger

Script for a Call external API call in Swagger