Intro to Formulas (Recipes v2)

Welcome to Merch Jar Formulas, the next generation of our Recipes v1, and the powerful engine behind segment creation and automation! Formulas provide a flexible and precise way to segment and analyze your Amazon Ads data, define custom calculations, and build automation workflows using a dedicated syntax.

While the core goal remains automating actions based on data, the Formulas (V2) syntax offers significantly more flexibility, power, and clarity.

The Core Conceptual Shift: Formulas → Segments → Workflows

In V1, a "Recipe" encompassed the logic, the action, and the schedule all in one. Over the coming weeks we will be transitioning to Formulas (v2) which separates these concepts for greater flexibility:

  1. Formula: This is where you write the logic using the V2 syntax in the Composer. It defines how to filter your data and what custom calculations (Custom Properties) to perform.
  2. Segment: This is the result of applying your Formula to a selected Dataset. It's the filtered list of items (Campaigns, Keywords, etc.) plus any Custom Property columns you defined with let.
  3. Workflow: This defines the Action (e.g., Change Bid, Set State) and the Schedule/Frequency (e.g., Daily, Manual) to be applied to the items within a specific Segment.

What are Formulas?

Think of Formulas as a specialized language combining advanced filtering capabilities with dynamic calculations. Unlike basic filters, Formulas allow you to:

  • Define highly specific criteria for advanced filtering and segmentation of campaigns, ad groups, keywords, etc.
  • Compare performance across different time periods (e.g., this month vs. last month) and properties (e.g. acos > target acos).
  • Perform mathematical calculations directly on your metrics (e.g., sales(14d) / clicks(14d) to get RPC).
  • Create Custom Properties (calculated columns) using variables (let) to store values or complex expressions for analysis and use in actions.
  • Implement complex conditional logic using case statements (if/then/else style).
  • Combine multiple conditions with sophisticated boolean logic (and/or) and grouping ().

This capability enables you to pinpoint very specific Segments of your advertising entities based on nuanced performance or configurations, and even generate new calculated data points (Custom Properties) for those segments.

What's New & Different from Recipes V1?

If you're familiar with our legacy Recipes (v1), the Formulas (v2) syntax is significantly more capable. Key enhancements include:

  • New properties: including target acos, match type and last bid change.
  • Flexible Time Period Comparisons: Directly compare different date ranges (e.g., sales(30d) > sales(30d..60d)).
  • Math Operations: Perform math directly in your rules (e.g., bid < cpc(14d) * 1.1).
  • Variables let & Custom Properties: Define reusable variables that also appear as calculated columns in your results.
  • Conditional Logic case: Implement if/then/else style logic.
  • New Targeting Dataset: a combined Keywords and Targets dataset for more streamlined automation.
  • Clearer Syntax: More intuitive structure, separating time-based metrics (clicks(30d)) from static properties (campaign name).

Getting Started

Ready to explore? Head over to our guide on Writing Formulas to learn how to access the editor and write your first rule. For a detailed breakdown of all available syntax elements, consult the Syntax Reference.

PREVIOUS ARTICLE
NEXT ARTICLE