ChannelAdvisor Laurel Lockhart By Laurel Lockhart

Understanding Digital Marketing Business Rules

Digital Marketing has a number of opportunities for business rules that aren’t present for other marketplaces, as well as rules that are required to pull data from other sections of the software to send information in your feeds. We’ll review some of these special circumstances and opportunities for business rules for digital marketing in this post.

Category Mappings

Category mappings allow you to map the categories from your site to the list of acceptable categories for a shopping provider. This is similar to using a lookup list, but by using our standard mappings, it provides you with the list of acceptable values for the provider, checks to make sure the values you are uploading are part of this list and will transform your mappings to numeric categories if the provider requires it, leaving the text for you to more easily view.

However, just completing the category mappings won’t send the values you mapped to the shopping provider unless you also map the “Standard Category Mapping Logic” business rule to your template.

The rule expression should look something like:


SYSLOOKUP stands for system lookup. The category mappings are creating lookup lists on the back end of our system that cannot be viewed or edited directly and are referenced using the SYSLOOKUP function instead of the standard LOOKUP function.

You’ll also notice the $$merchantcategory looks different than other references you’ve seen.  The double $ tells our system to look at what is mapped to the field under Digital Marketing > Account Settings > Reference Field Mappings instead of looking for an attribute with the name Merchant Category. This is the same field used for the Source Category column in the category mappings, so if you update the reference field mappings, the rule would not need to be changed if you use the $$merchantcategory reference.

You may also see a normal attribute referenced here. If that is the case, you’ll want to make sure it matches the Merchant Category mapping for Reference Field Mappings, and if you update the mapping, you must also update the rule.

As we all know, a lot of shopping providers are moving toward using the Google Shopping feed specification for their sites as well. Instead of having to repeat the same mappings for all of these sites, you can use the GETCATEGORYMAPPINGFORSITE rule to pull in the category mapping for another provider. The rule takes two inputs; the first is the provider name for which you want to return the mappings and the second is the source category field. So, if you wanted to return Google Shopping categories, the rule expression would be:

GETCATEGORYMAPPINGFORSITE(“Google Shopping”, $$merchantcategory)

Promotion IDs

Similarly, if you are using ChannelAdvisor to create and send promotions to Google Shopping, you will need to use the “Google Shopping Adwords PromotionIDs” business rule in the Promotion ID field of the Google Merchandiser. The rule has a simple expression of:


This rule pulls in the promotion IDs you associated with the SKUs in Actionable Reporting. It should map to the default Google Shopping template automatically when you create it, but if you are not using our system for promotions, you can overwrite it to send your own promotion IDs.

Tracking URLs

A lot of sellers will use other performance tracking services in addition to ChannelAdvisor’s tracking for their shopping feeds. You can use business rules to append the tracking parameters for each provider to your product URLs.

Let’s say your product link is stored in the Action URL attribute and you want to include &provider= followed by the name of the shopping engine at the end of each URL. You could do this with a CONCATENATE function and make a different rule for every feed you have:

CONCATENATE($actionurl, “&provider=googleshopping”)

But if you need to adjust this to also include &product= followed by the SKU number, you would have to update each rule with the same code. Instead, you can use the GETCONTEXTVALUE function and a lookup list to add the tracking you want for each provider. The code GETCONTEXTVALUE(“SiteName”) will return the name of the provider based on the feed it is mapped to. This probably won’t be in the format you want for your URLs, but you can use this in conjunction with a lookup list to append the tracking you want. So, let’s say you have a lookup list called “Provider Tracking” with the following data:

Name Value
Google Shopping &provider=googleshopping
Facebook Ads &provider=facebook

You could then add the tracking to all providers in one business rule using the expression:

CONCATENATE($actionurl, LOOKUP(“Provider Tracking”,GETCONTEXTVALUE(“SiteName”)))

To get the values you will need for the Name column of your lookup list, use the gear icon in the rule preview box and, from the drop-down list, select the destination site from which you’d like to preview the rule.

Digital Marketing Business Rules Preview Settings


Business rules can also be used to remove items from feeds. At the bottom of the Merchandiser tab of the feed editor, you’ll see a section called Filters, where you can apply these business rules.

Digital Marketing Business Rules Filters

You’ll see some filter examples showing here already, but not all of your business rules appear.  The reason for this is that for a rule to be a filter, it must return a logical true or false. Items with a true return will be removed from the feed, while items with a false return will be sent, assuming no other filter rules would remove them.

So the next question I’m sure you want to ask is: “What do you mean by a logical true or false?”  As an example, let’s say you want to remove all items with the brand Acme from your feed. The following filter returns a logical true or false because it’s a conditional statement:

$itembrand = “Acme”

On the other hand, the following rule would return a text value of true or false, not a logical one:

IF($itembrand = “Acme”, “true”, “false”)

Therefore, the second rule would not appear in the Available Filters section of the template, while the first rule would.

You should now have a basic understanding of how you can use business rules in Digital Marketing feeds to pull in data from other areas of the platform, add tracking parameters in a single rule, or filter items from your feeds.

Talk to an ExpertRequest A Call