INSTRUCTIONAL VIDEO:
Use Case
Removing an entire Brand AND concurrently combining Product Categories within the client’s catalog and rendering it “Out of Stock” so it won’t show up in their ads.
Example:
This past Monday, Dick’s Sporting Goods client requested you wants to remove both Nike brand due to a pending contract disputes. However, a few minutes later, client calls again to also urgently want to remove Flip Flops off their ads also due to the CDC report that shows a study correlating flip flops wearing and hair loss.
Given there’s only one Availability field to put in 1 code, we would need to combine two simple Max Rules into 1 combined rule….
We are therefore combining with what we learned in
EXTERNAL | Availability Max Rule Code #1: Removing Specific Brands off Product Catalog off Ads AND
Availability Max Rule Code #2: Removing Google Product Category off Product Catalog off Ads
(If you haven’t reviewed the video of Availability Max Code 1 or Availability Max Code 2, please watch those video lessons first before proceeding.
Code to solve this example is:
{{#if (any_true (icontains brand "Nike") (icontains google_product_category "flip flops")) }}out of stock{{else}}{{{'availability'}}}{{/if}}
Solution is to apply the following Max code to the Availability Field in Product Catalog:
Copy and Paste this Code |
{{#if (any_true (icontains brand "FIRST BRAND NAME HERE") (icontains google_product_category "FIRST CATEGORY HERE")) }}out of stock{{else}}{{{'availability'}}}{{/if}}
|
Instructions to ADD Max Rule Yourself:
|
7. Note that if you want to add additional BRANDS or Additional PRODUCT CATEGORIES to remove…
|
9. Leave the rest of the code alone and don’t edit anything else! 10. Click APPLY |
NOTES:
Input this in the
Availabilityfieldbrand / google_product_category - input the field(s) that you want to match
"Nike"/"Adidas"/"Flip Flops"input the text you want to match for each fieldText is case insensitive so
"Nike"/"nike", "Adidas"/"adidas" and "Flip Flops"/"flip flops"will be matchedicontains does not accept lists so if you want to mark multiple brand/google_product_category/etc as out of stock a new
(icontains <field> <text>)must be added for each additional brand or category
out of stock- any matching IDs will have out of stock input into the availability field. Change out of stock if you want to insert different text.
Comments
0 comments
Please sign in to leave a comment.