Example Formulas & Use Cases

This page provides practical examples of Merch Jar Formulas to illustrate how you can segment your data, create custom calculations, and build logic for your Workflows. Use these as inspiration and adapt them to your specific needs.

Remember to select the correct Dataset Source in the Composer for each formula. Refer to the Syntax Reference for detailed definitions of all properties and functions.

Filter for enabled keywords exceeding ACOS target with minimum interaction

Find high ACOS Keywords that still have decent clicks (potential bid decrease candidates).

// Filter for enabled keywords exceeding ACOS target with minimum interaction
acos(30d) > target acos * 1.2      // ACOS is 20%+ over target
and clicks(30d) > 5                // Ensure keyword has some traffic
and state = "effectively enabled"    

Sales dropped compared to last period

sales(30d) < sales(31d..61d) * 0.9

Targets below average monthly sales

let days = 365d;
let drop_threshold = 80%;
let avg_sales = sales(days) / 30;

sales(30d) < avg_sales * drop_threshold and clicks(30d) > 10

Dynamic Target ACOS based on AOV

// Set target ACoS based on AOV (Average Order Value)
let time = 30d;
let target_acos = case(
   when aov(time) < $20 then 20%,
   when aov(time) < $30 then 25%,
   when aov(time) < $50 then 30%,
   else 40%
);

// Find targets where ACoS exceeds their target based on AOV
acos(time) > target_acos

Keywords Above Target CPC

// User set variables
let target_acos = 30%;
let range = 30d;
let cpc_threshold = 20%;

// Calculate Target CPC
let target_cpc = sales(range) / clicks(range) * target_acos

// Find keywords above Target CPC Threshold
cpc(range) > target_cpc * (1 + cpc_ threshold)

CPC Trends for Bid Management

// Detect rising CPC trend over last 30 days vs. prior 30 days
let cpc_trend = cpc(30d) / cpc(31d..61d);

// If CPC is up 20% or more, reduce bid
cpc_trend > 1.2
PREVIOUS ARTICLE
NEXT ARTICLE