Configuration
The Configuration component in Integrations allows configurable values to be modified separately from the flow.
API version / SDK version
The Configuration component has a text field credential with the following rules:
-
It must be a valid JSON for the credentials to be verified.
-
It must not exceed 5KB in size.
The screenshot below shows the configuration component Choose Credential stage during the integration flow design. The text field will be evaluated to confirm the above conditions are met.
After confirmation, it emits a message with an object equivalent to the JSON in the configuration. Any data used in the flow and repeated in multiple places can be configured in a single step. From then on, the new values are used where needed.
Credentials
Configuration data should be specified as credentials of a JSON format. JSON must be valid for credentials to be verified (except arrays as discussed in the Known limitations section below). Credential verification will fail otherwise.
Input data example
Consider the following example:
-
Someone wants to synchronize prices between an ERP and an E-SHOP
-
The price logic is so complex that it can not pragmatically exist in a single flow.
-
Prices in the ERP exist only in currency A. Prices in the E-SHOP are in currency B. The customer wants to convert prices as data is moved between systems at a fixed rate that they set.
-
This fixed rate must be the same between all flows.
If the configuration component existed, you build flows of the following form:
ERP.GetPriceInfo()
-> Config.LoadConfig()
-> E-SHOP.SetPrice(price := ERPResults.Price * ConfigResults.ExchangeRate)
If one needed to change the exchange rate, that value could be edited by modifying the configuration credentials to include the new rate and then resetting the snapshot for all the price import flows.
Currency rates sample:
{
"USDEUR": 0.881715,
"USDFJD": 2.115102,
"USDPLN": 3.787097,
"USDQAR": 3.641042,
"USDUAH": 30.718014,
"USDZWL": 322.355011
}
Then the currency rate can be used in any number of flows and changed from a single location. Any changes will reflect in all flows where the credential is used.
Triggers
The configuration component has no trigger functions. This means the component can not be selected as the first step in any integration flow.
Actions
- Emit data
-
This action emits the configuration data as a valid JSON object in a message. The output JSON schema can have any complexity.
Known limitations
-
As real-time flows use credentials saved when starting the flow, this component should be used only in standard flows. This is not a bug or limitation but a platform-specific case.
-
Despite naked arrays being valid JSON, some platform limitations do not allow access to the data in such arrays emitted from a component from the next step. Naked arrays should not be passed to the component directly.
Consider using the following example (1) rather than the one below it (2):
{ (1) "Product": [ { "Product Name": "Bowler Hat", "ProductID": 858383, "SKU": "0406654608", "Description": { "Colour": "Purple", "Width": 300, "Height": 200, "Depth": 210, "Weight": 0.75 }, "Price": 34.45, "Quantity": 2 } ] }
[ (2) { "Product Name": "Bowler Hat", "ProductID": 858383, "SKU": "0406654608", "Description": { "Colour": "Purple", "Width": 300, "Height": 200, "Depth": 210, "Weight": 0.75 }, "Price": 34.45, "Quantity": 2 } ]