Creating and Managing Rule Sets

Edited

PeakCommerce Rules Engine: Creating and Managing Rule Sets

1. Adding a Rule Set

To create a new Rule Set, you'll need to specify the following:

  • Name: Provide a unique name for the Rule Set.

  • Event: Select the event that will trigger the rule.

  • Priority: Set the order in which the rules will execute.

  • Currency: Define the applicable currency.

Available events that can trigger the rule include:

  • Quantity Changed

  • Plan Selected

  • Step Confirmed

  • Page Loaded

2. Viewing and Managing Rule Sets

Once a Rule Set is created, you can add and view individual rules within it by accessing the Rule Set.

3. Adding a Rule

When adding a rule, you'll need to specify the following:

  • Name: Assign a name to the rule.

  • Priority: Determine the order of execution.

  • IF and THEN Statements: Define the conditions (IF) and corresponding actions (THEN).

  • To include an IF statement, uncheck the "Always True" option.

IF Conditions

You can base the IF conditions on the following factors:

  • Id: PeakCommerce Product ID

  • Existing Subscription: Status of an existing subscription

  • Name: PeakCommerce Product Name

  • Quantity: Number of products

  • Selected: Product selection status

  • Second.Id: Product ID of the second product selected

  • Second.Name: Name of the second product selected

  • Second.Quantity: Quantity of the second product selected

  • Second.Selected: Selection status of the second product

  • Rel.First.Quantity: Relationship of quantity between the first and second products

Additionally, all custom subscription fields from the billing system will be available as optional IF conditions.

IF Relations

For IF conditions, you can define relationships using:

Numerical Relations:

  • Equal To

  • Less Than

  • Less or Equal To

  • Greater Than

  • Greater or Equal To

  • Between

  • Not Between

Textual Relations:

  • Equal To

  • Not Equal To

  • Begins With

  • Doesn't Begin With

  • Contains

  • Doesn't Contain

  • Ends With

  • Doesn't End With

  • Is Empty

  • Is Not Empty

THEN Actions

Based on the IF conditions, the following actions can be triggered:

  • Raise Error

  • Deactivate Plans

  • Select Plans

  • Enforce Minimum

  • Enforce Maximum

  • Enforce Min and Max

  • Match Quantity

  • Hide Categories

  • Hide Products