Welcome to Zuora Product Documentation

Explore our rich library of product information

Create a rule from scratch

Learn how to create a rule from scratch by defining triggers, conditions, and actions in the Payment Gateway Routing interface.

Complete the following steps to define a rule:

  1. In the Routing Rules section on the Payment Gateway Routing tab, click Create Rule > Create from Blank .
  2. Add a Trigger component. From the Component Library on the left, drag and drop the Payment Trigger component to the trigger node in the editing area.
  3. Add Condition components. You can drag and drop to move your rule map.
    1. Click the plus icon on the connector line.
    2. Select a condition type for your needs. The condition builder dialog opens. For more information about each condition type, see the preceding Introduction section.
    3. In the Basic Info section, enter a name for the condition in the Description Name field. This name will be displayed in the condition node.
    4. In the Route Condition section, define route conditions. Each route condition represents a branch of the rule.
      1. Define the first route condition. Enter a label for the branch, select an attribute from the field on the left, select an operator from the field in the middle, and specify an attribute value in the field on the right. The Split Traffic Condition has only two branches. For each branch, enter a label for the branch in the left field and enter an integer in the right field. If you want to combine multiple attributes to handle complex gateway decision-making, you can add multiple condition items. Click Add Rule , and then define the item. The items are joined with an AND comparator. For example, you can define an item for Amount Greater Than 100 , and an item for Currency Equal To US Dollar . The transactions that meet this condition (amount > 100 AND currency = USD) will be routed to this branch.

      2. Define more route conditions by clicking Add Conditional Branch . Repeat step i to define the items of each condition.

      3. Click Save .

  4. Add an Action component:
    1. Click the plus icon on the connector line behind the last condition of a branch.
    2. Click Assign Gateway under Actions .
    3. Enter a name for the action and select a payment gateway instance available on your tenant from the Payment Gateway list.
    4. Click Save .
  5. If you want to do an in-transaction retry based on the Gateway Response Code without needing to wait for another retry cycle, add a Response Condition component, and then add an Assign Gateway Action.
  6. After you finish editing all branches, give your rule a name:
    1. Click the pen icon in the upper left of the page.
    2. Enter a name in the field next to the Rename button.
    3. Click Rename .
  7. Click Save in the upper right of the page to save your rule.

The rule is created in inactive status. To activate it, see Activate a rule for more information.

The newly created rule will be the last one in the rule priority list. To change the order of the priority, see Prioritize rules .