Skip to main content

Decision tree overview

Zuora

Decision tree overview

Decision tree, a supported custom logic type in Zuora, allows you to define logic rules for standard objects with a codeless user interface.

You can create logic rules with if-then-else statements in decision trees. When objects are created or updated, Zuora triggers the rules in decision trees to validate data accuracy or manipulate field values.

If you want to create more complicated logic rules with advanced calculations or operations, see Function.

Supported objects

You can create decision trees for the following standard objects:

  • Account
  • Contact
  • Credit Memo
  • Debit Memo
  • Order Line Item
  • Payment
  • Payment Method
  • Product
  • Product Rate Plan
  • Product Rate Plan Charge
  • Product Rate Plan Charge Tier
  • Rate Plan
  • Refund
  • Subscription

The fields that can be used in conditions or results of decision trees vary depending on the object type. For more information, see Objects and fields supported by Custom Logic.

Rule evaluation process

A decision tree consists of one or more if-then statements and one else statement.

When an object is created or updated, Zuora evaluates the first if-then statement in the decision tree. If the conditions in the IF statement are met, Zuora executes all results in the THEN statement. If the conditions are not met, Zuora skips this if-then statement and evaluates the next one.

If all if-then statements are skipped, Zuora evaluates the results in the ELSE statement.

Example

decision tree

In this example, when an account object is created or updated, if the CustomerBalance__c custom field of this account is greater than or equal to 0, the evaluation succeeds and Zuora will create or update the account object. Otherwise, the evaluation fails and Zuora will not create or update the account object.