How To

Using Business Rules with the Merchandiser

With strict length limits, writing Paid Search Ad copy using business rules can be challenging, but taking advantage of functions like IF , SELECTCASE , LENGTH , and CONCATENATE , we can write rules that accommodate the different lengths of feed values to create the most relevant ads possible.  Different combinations of these four  simple rules can help you acheive the following scenarios in regards to creating Paid Search ads: 

  • 1 & 2 . Include product titles and prices in Ad Headlines depending on character limits.
  • 3 & 4 . Include product brands and classifications in Ad Descriptions using different verbage depending on character limits.
  • 5 . Include promotional text in Ad Descriptions based on whether or not the items have free shipping.
  • 6 . Include the product brand in the Ad Display URL depending on character limit. 

Prerequisites


You should be familiar with the following topics:

Now let's review these functions:

 

FunctionDescriptionExampleOutput
IF

Returns one value if a specified true/false condition is true, and another if it is false. This is a good alternative to SELECTCASE if there is only one condition to check. It works like the “if-else” statement in many programming languages.

IF({{shippingprice}} > 0,{{shippingprice}},5.00)

Shipping value or $5 for items with zero shipping.

SELECTCASE

Evaluates up to 5 true/false conditions and returns the corresponding value for the first condition that is true, or a specified default value. The minimum number of arguments to this function is 3: one condition, one value, and a default. Conditions must evaluate to true or false-if one of the conditions evaluates to a string or number instead, an error will occur.

SELECTCASE(3 = 1, “Three equals one!”, 4 > 2, “Four is more than two!”, “I'm surprised to be here.”)

“Four is more than two!”

LENGTHReturns the number of characters in a string.LENGTH("Hello world!")12
CONCATENATEJoins up to 8 text strings into one string.  There is no space or other delimiter inserted between the input strings.CONCATENATE("Space","man")"Spaceman"

 

To learn more about these and other business rules, please visit the Using Business Rules page.


See These Functions in Use:


Here are several example scenarios.   Note that these are just examples and will need to be customized to fit your specific needs and inventory configuration 

Use Case 1: 

Your company wants to put their product title and price into the headline, but if that’s too long, they’ll launch a static headline. They use an IF function in conjunction with theLENGTH  function to check the length of the combination of title and price and launch the static text when that’s too long.

Solution:  IF(LENGTH(CONCATENATE({{itemtitle}}," $",{{itemretailprice}}))<26,CONCATENATE({{itemtitle}}," $",{{itemretailprice}}),"{KeyWord:Buy Shutterbug Cameras}")

 Input Output
 Item Title :  Shutterbug Camera 
Buy It Now Price :  99.99
 Shutterbug Camera $99.99
 Item Title :  Shutterbug Digital Camera 
Buy It Now Price :  99.99
 {KeyWord:Buy Shutterbug Cameras}

 

Use Case 2: 

After running these ads, the company sees that a lot of their ads have the generic headline and realize that they could get the product title into more ads if they dropped the price. To introduce this extra condition, they’ll need to use a SELECTCASE function, which allows for a series of true/false conditions. The function will move through the conditions until it finds one that’s true, and if none are true, it will use the default value.

Solution: SELECTCASE(LENGTH(CONCATENATE({{itemtitle}}," $",{{itemretailprice}}))<26,CONCATENATE({{itemtitle}}," $",{{itemretailprice}}), LENGTH({{itemtitle}})<26,{{itemtitle}},"{KeyWord:Buy Shutterbug Cameras}")

InputOutput
Item Title :  Shutterbug Camera 
Buy It Now Price :  99.99
Item Title :  Shutterbug Digital DSLR Camera 
Buy It Now Price :  99.99
Item Title :  Shutterbug Digital Camera 
Buy It Now Price :  99.99
Shutterbug Digital Camera
Item Title :  Shutterbug Digital DSLR Camera 
Buy It Now Price :  99.99
{KeyWord:Buy Shutterbug Cameras}

 

Use Case 3:

For the first Description line, the company would like to include the product’s brand and the name of their company. They’ll use SELECTCASE again to account for the different lengths of brands and include promotional language where possible.

Solution:  SELECTCASE(LENGTH(CONCATENATE("Save on ",{{brand}}," at Shutterbug."))<36,CONCATENATE("Save on ",{{brand}}," at Shutterbug."),LENGTH(CONCATENATE("Buy ",{{brand}}," at Shutterbug."))<36, CONCATENATE("Buy ",{{brand}}," at Shutterbug."), LENGTH(CONCATENATE({{brand}}," at Shutterbug."))<36, CONCATENATE({{brand}}," at Shutterbug."),“Save on Products at Shutterbug.”)

InputOutput
Brand :  Dinon
Save on Dinon at Shutterbug.
Brand :  ADifferentBrand
Buy ADifferentBrand at Shutterbug.

Brand :  MyLongProductBrand
MyLongProductBrand at Shutterbug.
Brand :  MyExtremelyLongProductBrandSave on Products at Shutterbug.

 

Use Case 4:

Later, the company decides that they’d like to test having the item classification in the Description instead of their name, so they again turn to SELECTCASE .

Solution:  SELECTCASE(LENGTH(CONCATENATE("Save on ",{{brand}},” “,{{itemclassification}},”."))<36,CONCATENATE("Save on ",{{brand}},” “,{{itemclassification}},”."), LENGTH(CONCATENATE("Buy ",{{brand}},” “,{{itemclassification}},”."))<36,CONCATENATE("Buy ",{{brand}},” “,{{itemclassification}},”."), LENGTH(CONCATENATE({{brand}},” “,{{itemclassification}},”."))<36,CONCATENATE({{brand}},” “,{{itemclassification}}, "."),“Save on Products at Shutterbug.”)

InputOutput
Brand :   Dinon 
Classification :  Cameras
Save on Dinon Cameras.
Brand :   Shutterbug 
Classification :  Parts & Accessories
Buy Shutterbug Parts & Accessories.
Brand :  MyLongerBrand 
Classification :  Parts & Accessories
MyLongerBrand Parts & Accessories.
Brand :  MyEvenLongerBrand 
Classification :  Parts & Accessories
Save on Products at Shutterbug.
 

Use Case 5:

For Description Line 2, the company offers free shipping on most products and would like to include that in their ad text. However, not all products qualify, so using the IF  function and the shipping price field in their feed, they’re able to create two versions of ad text depending on whether or not the product qualifies for free shipping.

Solution:  IF({{shippingprice}}=0,"Free Shipping, Buy Today!","Great Prices, Buy Today!")

InputOutput
Shipping Price :   0.00
Free Shipping, Buy Today!
Shipping Price :   5.00Great Prices, Buy Today!

 

Use Case 6:

For Description Line 2, the company offers free shipping on most products and would like to include that in their ad text. However, not all products qualify, so using the IF  function and the shipping price field in their feed, they’re able to create two versions of ad text depending on whether or not the product qualifies for free shipping.

Solution:  IF({{shippingprice}}=0,"Free Shipping, Buy Today!","Great Prices, Buy Today!")

 

InputOutput
Brand :  Dinonwww.Shutterbug.com/Dinon
Brand :  Nikos Imaging
www.Shutterbug.com/Nikos-Imaging
Brand :  Adams and Sons Photographywww.Shutterbug.com

 

And that’s it, with a few simple business rules we have highly relevant and effective ad copy that’s guaranteed to work across an entire feed of products.

With strict length limits, writing Paid Search Ad copy using business rules can be challenging, but taking advantage of functions like IF , SELECTCASE , LENGTH , and CONCATENATE , we can write rules that accommodate the different lengths of feed values to create the most relevant ads possible.  Different combinations of these four  simple rules can help you acheive the following scenarios in regards to creating Paid Search ads: 

  • 1 & 2 . Include product titles and prices in Ad Headlines depending on character limits.
  • 3 & 4 . Include product brands and classifications in Ad Descriptions using different verbage depending on character limits.
  • 5 . Include promotional text in Ad Descriptions based on whether or not the items have free shipping.
  • 6 . Include the product brand in the Ad Display URL depending on character limit. 

Prerequisites


You should be familiar with the following topics:

Now let's review these functions:

 

FunctionDescriptionExampleOutput
IF

Returns one value if a specified true/false condition is true, and another if it is false. This is a good alternative to SELECTCASE if there is only one condition to check. It works like the “if-else” statement in many programming languages.

IF({{shippingprice}} > 0,{{shippingprice}},5.00)

Shipping value or $5 for items with zero shipping.

SELECTCASE

Evaluates up to 5 true/false conditions and returns the corresponding value for the first condition that is true, or a specified default value. The minimum number of arguments to this function is 3: one condition, one value, and a default. Conditions must evaluate to true or false-if one of the conditions evaluates to a string or number instead, an error will occur.

SELECTCASE(3 = 1, “Three equals one!”, 4 > 2, “Four is more than two!”, “I'm surprised to be here.”)

“Four is more than two!”

LENGTHReturns the number of characters in a string.LENGTH("Hello world!")12
CONCATENATEJoins up to 8 text strings into one string.  There is no space or other delimiter inserted between the input strings.CONCATENATE("Space","man")"Spaceman"

 

To learn more about these and other business rules, please visit the Using Business Rules page.


See These Functions in Use:


Here are several example scenarios.   Note that these are just examples and will need to be customized to fit your specific needs and inventory configuration 

Use Case 1: 

Your company wants to put their product title and price into the headline, but if that’s too long, they’ll launch a static headline. They use an IF function in conjunction with theLENGTH  function to check the length of the combination of title and price and launch the static text when that’s too long.

Solution:  IF(LENGTH(CONCATENATE({{itemtitle}}," $",{{itemretailprice}}))<26,CONCATENATE({{itemtitle}}," $",{{itemretailprice}}),"{KeyWord:Buy Shutterbug Cameras}")

 Input Output
 Item Title :  Shutterbug Camera 
Buy It Now Price :  99.99
 Shutterbug Camera $99.99
 Item Title :  Shutterbug Digital Camera 
Buy It Now Price :  99.99
 {KeyWord:Buy Shutterbug Cameras}

 

Use Case 2: 

After running these ads, the company sees that a lot of their ads have the generic headline and realize that they could get the product title into more ads if they dropped the price. To introduce this extra condition, they’ll need to use a SELECTCASE function, which allows for a series of true/false conditions. The function will move through the conditions until it finds one that’s true, and if none are true, it will use the default value.

Solution: SELECTCASE(LENGTH(CONCATENATE({{itemtitle}}," $",{{itemretailprice}}))<26,CONCATENATE({{itemtitle}}," $",{{itemretailprice}}), LENGTH({{itemtitle}})<26,{{itemtitle}},"{KeyWord:Buy Shutterbug Cameras}")

InputOutput
Item Title :  Shutterbug Camera 
Buy It Now Price :  99.99
Item Title :  Shutterbug Digital DSLR Camera 
Buy It Now Price :  99.99
Item Title :  Shutterbug Digital Camera 
Buy It Now Price :  99.99
Shutterbug Digital Camera
Item Title :  Shutterbug Digital DSLR Camera 
Buy It Now Price :  99.99
{KeyWord:Buy Shutterbug Cameras}

 

Use Case 3:

For the first Description line, the company would like to include the product’s brand and the name of their company. They’ll use SELECTCASE again to account for the different lengths of brands and include promotional language where possible.

Solution:  SELECTCASE(LENGTH(CONCATENATE("Save on ",{{brand}}," at Shutterbug."))<36,CONCATENATE("Save on ",{{brand}}," at Shutterbug."),LENGTH(CONCATENATE("Buy ",{{brand}}," at Shutterbug."))<36, CONCATENATE("Buy ",{{brand}}," at Shutterbug."), LENGTH(CONCATENATE({{brand}}," at Shutterbug."))<36, CONCATENATE({{brand}}," at Shutterbug."),“Save on Products at Shutterbug.”)

InputOutput
Brand :  Dinon
Save on Dinon at Shutterbug.
Brand :  ADifferentBrand
Buy ADifferentBrand at Shutterbug.

Brand :  MyLongProductBrand
MyLongProductBrand at Shutterbug.
Brand :  MyExtremelyLongProductBrandSave on Products at Shutterbug.

 

Use Case 4:

Later, the company decides that they’d like to test having the item classification in the Description instead of their name, so they again turn to SELECTCASE .

Solution:  SELECTCASE(LENGTH(CONCATENATE("Save on ",{{brand}},” “,{{itemclassification}},”."))<36,CONCATENATE("Save on ",{{brand}},” “,{{itemclassification}},”."), LENGTH(CONCATENATE("Buy ",{{brand}},” “,{{itemclassification}},”."))<36,CONCATENATE("Buy ",{{brand}},” “,{{itemclassification}},”."), LENGTH(CONCATENATE({{brand}},” “,{{itemclassification}},”."))<36,CONCATENATE({{brand}},” “,{{itemclassification}}, "."),“Save on Products at Shutterbug.”)

InputOutput
Brand :   Dinon 
Classification :  Cameras
Save on Dinon Cameras.
Brand :   Shutterbug 
Classification :  Parts & Accessories
Buy Shutterbug Parts & Accessories.
Brand :  MyLongerBrand 
Classification :  Parts & Accessories
MyLongerBrand Parts & Accessories.
Brand :  MyEvenLongerBrand 
Classification :  Parts & Accessories
Save on Products at Shutterbug.
 

Use Case 5:

For Description Line 2, the company offers free shipping on most products and would like to include that in their ad text. However, not all products qualify, so using the IF  function and the shipping price field in their feed, they’re able to create two versions of ad text depending on whether or not the product qualifies for free shipping.

Solution:  IF({{shippingprice}}=0,"Free Shipping, Buy Today!","Great Prices, Buy Today!")

InputOutput
Shipping Price :   0.00
Free Shipping, Buy Today!
Shipping Price :   5.00Great Prices, Buy Today!

 

Use Case 6:

For Description Line 2, the company offers free shipping on most products and would like to include that in their ad text. However, not all products qualify, so using the IF  function and the shipping price field in their feed, they’re able to create two versions of ad text depending on whether or not the product qualifies for free shipping.

Solution:  IF({{shippingprice}}=0,"Free Shipping, Buy Today!","Great Prices, Buy Today!")

 

InputOutput
Brand :  Dinonwww.Shutterbug.com/Dinon
Brand :  Nikos Imaging
www.Shutterbug.com/Nikos-Imaging
Brand :  Adams and Sons Photographywww.Shutterbug.com

 

And that’s it, with a few simple business rules we have highly relevant and effective ad copy that’s guaranteed to work across an entire feed of products.
0
Your rating: None
0
Your rating: None