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

Add a new Logic step using the button Add Logic Step at the bottom of the Logic screen.
mceclip0.png

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

If the Action river already exists, select it from the dropdown. If not, click the New Action button to create one. See here for guidelines on creating Actions.

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

mceclip3.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 two 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.
mceclip4.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:
mceclip5.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: Send a Logic Variable to an Action Step

In the following example, a Logic variable called “event_name” is sent to the Action variable “event”. The rest of the input variables of the Action are not filled out, meaning the Action will run using its original variable values.

mceclip6.png

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


Was this article helpful?