Custom Expressions in Rule Engine
Geetanjali Tyagi avatar
Written by Geetanjali Tyagi
Updated over a week ago

On this page:


What are Custom Expressions?

In the Rule Engine, "Custom Expressions" allow you to incorporate metrics generated by your own formulas when creating custom strategies.

For instance, if you typically track monthly budgets using a specific formula, for example, "Daily Budget * 30.4," you can build this expression and name it "Monthly Budget" using this feature and create rules based on it. This expression will also be visible on the Rule Engine Results page.

This feature is available in Rule Engine for Google Ads, Microsoft Ads, Amazon Ads, and Meta.

Why use Custom Expressions?

Custom Expressions extend the power of Rule Engine by enabling you to build rules using metrics beyond those provided by the API. This flexibility allows you to track and optimize accounts based on specific company metrics, receive alerts about changes in these metrics, and generate automatic reports.

Custom Expressions enable you to:

  • Create complex expressions that are not feasible to create with standard API metrics.

  • Replicate custom columns from ad platforms that aren't available in Rule Engine due to API restrictions.

  • Analyze weekly or monthly trends in metric values.

How to create a Custom Expression?

  • Click on “Add Condition” and change the “Value Type” to “Expression” from the dropdown.

  • Build the formula using metrics and operators.

  • Set a name for the expression in the text field and check the “Include expression value in results” option.

Sample use cases for this feature (combined with other advanced Rule Engine features)

Checking if the campaign cost exceeds the monthly target within 10 days

  • Create a condition comparing the campaign cost in the last 10 days (a custom date range) to 75% of the Monthly Target (custom expression).

  • Also, check if the minimum impression threshold is hit (use a custom variable for this).

  • If exceeded, reduce the Daily Budget by 20% and/or generate a report.

  • Automate this strategy and "add it to Alerts" to get notified automatically when the campaigns are overspending.

Monitoring weekly declines in ad CTR and conversions

  • Create a condition comparing the CTR and conversions of ads in the current week to 50% of the CTR and conversions of ads last week.

  • Add an action to “Include in a report” and set up alerts for drops in CTR and conversions by automating the strategy.

Did this answer your question?