When configuring API calls in Studio, to connect to an outside system, you have to set each individual action with care (pun intended) to insert the correct endpoints and headers.
These values will probably stay identical for every API call to the same provider throughout your flow. Constants allow you to define these static values at care flow level, to re-use in the correct steps and fields of API calls.
Create a constant
Go to the Elements tab of your care flow
Select Constants in the right-hand menu
Click the "Create constant" button
Enter a name for the constant
Enter a value for the constant
Define if you want to conceal your value. Note: this action is irreversible. Once a value is concealed it will not be shown through the UI and will stay encrypted. When used in API calls, the receiving end will of course receive the decrypted value.
→ Click "Save" to start using your constants in your API call actions 🎉
👀 Tip: ensure you use HTTPS when making API calls. When a URL is embedded in a constant without using a secure protocol, a warning will pop-up in the API call action to let you know your URL is not allowed.
Use a constant
Open an API call action
in the request URL field for your API call, or
in the value field for your inserted header
Select one of the available constants in the drop-down. If your list is empty, head over to this section and create your constants first.