Page Category ads require a simple "context' to be sent to Project Agora Commerce. A "context" is a bit of code that defines the conditions under which a product is shown to a customer.
Minimum Viable Context:
Below are the minimum values needed to generate a category ad:
No customer information or cart items are necessary in this simple context. The simple context consists only of necessary filters.
In each category page the SPL requests should include all the categories belonging in the category path of this page. For instance if category C belongs to category B and B belongs to A, the category path is A > B > C, then the SPL request for the page C should have this filtering:
The discount and products fields are legacy and can be ignored
The static filterplacement:SponsoredProducts should be included in all SPL requests
In gtin field of the above responses you will get the pa_id as in the product feed for the product to be displayed.
Reminder: the pa_id is the concatenation of the catalog prefix and each product SKU, so to identify which SKU to display on your side you may need to remove the catalog prefix and the symbols "--"
pa_id= catprefix--SKU
Filtered Browsing
When a user filters browsing deeper into subcategories, you are able to serve ads relevant to their filters using more productFilters in the context.
In this example, the user has navigated to the Computers category, and browsed further to "Laptops" and "Windows" categories. This is a new request and considered by Project Agora Commerce as a new page, and new set of ads. Even in the rare event the ads served are identical to the unfiltered results.
Kindly note that the process for requesting an SPL ad inside a brand/vendor page is exactly the same except from the Product Filtering which changes like this: