How to reference data using Double Braces
Learn more about Double Braces functions and how to use them in the Digibee Integration Platform.
You can use Double Braces in multiple ways: to access data received by the component in JSON format, to reference Globals, accounts or metadata.
Here’s how you can do this:
Referencing JSON data
Suppose a component receives the following JSON data about an employee named John Doe:
Referencing the whole data
To reference the whole JSON data received by the component, use the following syntax:
Here:
message is a reserved word that refers to the data that was received by the component in question, known as payload.
$ indicates that you are referring to the entire payload.
Referencing specific properties
Use the following syntax to reference specific properties of a JSON, replacing terms in angle brackets with the desired value:
Here:
message is a reserved word that refers to the data that was received by the component in question, also called the payload.
property-name refers to the name of the desired property.
For example, if you want to reference John Doe’s email address, use the following notation:
To access nested properties, use the dot notation recursively. For example, to reference John Doe’s ZIP code, use the following notation:
Referencing Globals
Globals are user-created variables that can be referenced in multiple pipelines. To learn more about Globals, read this documentation.
To reference a Global using Double Braces, use the following syntax, replacing terms in angle brackets with the desired value:
Here:
global is a reserved word.
global-name is the name of the desired global.
Although Globals can also work without the prefix global
, we strongly recommend using the prefix, as expressions without this prefix will no longer be supported in the future.
Suppose you want to reference a Global called “my-global”. Use the notation:
Referencing accounts
Accounts are user-defined credentials that can be referenced in multiple pipelines. Read our Accounts documentation to learn more about them.
To reference an account, use the following syntax, replacing terms in angle brackets with the desired value:
Here:
account is a reserved word that refers to the accounts saved on the Digibee Integration Platform.
account-label refers to the account label on the accounts page.
field refers to the account field name on the accounts page, such as username, password, token, header-value, among others.
Suppose you want to reference the username of a saved account called emilys-account. To do this, use the following syntax:
Referencing metadata
Metadata can refer to various types of data, such as information about the pipeline itself, the current execution of the pipeline, the configuration used to run the pipeline, and the environment in which the pipeline is executing.
To access metadata, use the following syntax, replacing terms in angle brackets with the desired value:
Here:
metadata is a reserved word.
data refers to the metadata you want to access.
For example, use the following syntax to refer to the name of the pipeline in which this code is being executed:
These are all the metadata you can access with Double Braces:
Pipeline metadata
Deployment metadata
Pipeline execution metadata
Referencing Capsule property
In the Capsule configuration, you can define properties for parameters and use them in the configuration of components within the Capsule flow.
Use the following syntax to refer to a Capsule property:
capsule is a reserved word that refers to the Capsule properties.
property is the property set in the parameter within the Capsule configuration form.
For example, if you have created a property called messageError
in the Capsule configuration form and want to reference it in a component within the Capsule, use the following notation:
Last updated