Using integration variables

Apigee Integration variables can be accessed by an integration's elements in the following ways:

Element Usage of variables Example
Triggers Write values to variables Pub/Sub trigger writes a message to an input variable
Tasks

Read values from variables

Write values to variables

Read: The Read SFDC record task reads a table name from a variable

Write: The Update SFDC record task writes a new table entry to a variable

Edges Read values from variables Edge conditional checks whether a boolean parameter is true. If true, edge is executed.

Variable references

The tasks, triggers, and edges in an integration read and write to variables using variable references. A variable reference takes the form $paramKey$ where paramKey is the name of the variable. For example, an edge conditional could look like this:

NOT ($isNameUnique$ = false OR $numAccounts$ > 1)

In this example, isNameUnique is a variable of data type boolean and numAccounts is a parameter of data type integer.

Creating or editing variables

When a task or trigger is added to an integration, the Apigee Integration platform will automatically create the variables required to satisfy the default implementation of that task or trigger. In many cases, you may want to edit these variables or add new variables to your integration.

To edit an existing variable or add a new variable from the integration UI:

  1. Click the VAR menu button in the toolbar.
  2. To edit an existing variable:
    • Search or select the variable name from the dropdown list in the Variable list dialog.
    • The Edit variable dialog will open. Edit the variable details.
    • Click Save.
  3. To create a new variable:
    • Click Create on the Variable list dialog.
    • The Create variable dialog will open. Enter the variable details.
    • Click Save.

The Variable list pane can also be accessed by clicking anywhere on the Integration designer. Variables can be searched, edited, or added through the list pane.