Action Logic Step
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Action Logic Step

  • Dark
    Light
  • PDF

Article summary

Actions in Rivery Logic can be useful when there is a need to communicate with any REST service during the Logic’s run. 
This includes:

  • Running an action that returns variables so that these values can be used in other steps of the Logic.
  • Running an action that uses variables created in other Logic steps as inputs

Why Use an Action Step in Logic Rivers?

Imagine a case where you have a table which contains information about marketing campaigns, and there is a need to open a support ticket in Zendesk service for any campaign that reaches a certain 'low limit' of performance.

In a Logic, you can first create a step to query all of the campaigns that have 'low performance' and save this into a variable. Then, for each campaign you call an Action that sends a REST API request to open a Zendesk ticket for that particular campaign.

Add An Action Step to a Logic River

In the Logic step, click on the list in the top-left corner and select an Action.
image.png

If the Action River already exists, select it from the dropdown list. If not, see guidelines for creating Action Rivers.

Once an Action is selected in the Logic step, its input and output variables will be available in the step.

image.png

When an Action is selected, its connection is shown in the connection input. If necessary, change the selected connection of the Action, or create a new one. In the case where no connection is selected, the Action will use its original connection.

Using Action Variables in a Logic River

In the following example, there is a Logic River with 2 steps.

The first step calls an Action that connects to the Mixpanel API and returns an array of events data into a variable. The second step uses this array and sends a Variable to another Action.

image.png

Pass Variables to an Action Step in a Logic River

Select the required Action in the Logic step.
If the action has some variables (that are not private), all of the variables will be visible under its Input variables:

image.png

If the variable has a value that was configured in the Action, it will be visible here.
Insert any other value to pass to the action. It is also possible to pass in Logic variables (see example below).

Example: Sending a Logic Variable to an Action Step

In this example, a logic variable named "Num" is sent to the action variable "Page_val". The other input variables of the action are left blank, allowing the action to run with its original variable values.

image.png

image.png

See the REST Action documentation for more information on creating and configuring Action Rivers.


Was this article helpful?