# Custom Google Shopping feed

**URL:** <https://forum.litium.com/t/custom-google-shopping-feed/905>\
**Category:** Questions\
**Created:** [June 5, 2019, 12:53pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905 "2019-06-05T12:53:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobiasbalzano](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/tobiasbalzano/32/51_2.png) [@tobiasbalzano](https://forum.litium.com/u/tobiasbalzano)\
**Post date:** [June 5, 2019, 12:53pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/1 "2019-06-05T12:53:23Z")

</div>

Is there any way to extend or change the functionality of the Google shopping feed items when they’re being generated?  
For instance:  
We don’t want to map Google product category on a per product basis but rather use a field from the Main Category of the product instead. We also need to use article number from the product as MPN number and would preferably not have to specify a specific field for Brand since this is a single brand store we’re developing for.  
I’m asking since the panel in Back office won’t let me define these relationships.

Litium version: _[7.2.2]_

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [June 5, 2019, 2:38pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/2 "2019-06-05T14:38:06Z")

</div>

You’d have to create a custom feed to do all of those. The settings section only maps fields on the base product or variant.  
[https://docs.litium.com/documentation/litium-documentation/products/price-agents](https://docs.litium.com/documentation/litium-documentation/products/price-agents)

It’s also possible to solve some of them by using validations to copy values to fields on the product, but a custom feed is probably a better and more maintainable option.

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 5, 2019, 4:27pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/3 "2019-06-05T16:27:45Z")

</div>

If you implement your own `IPriceAgentItemFactory` you can decide where data for the different fields should be populated from.

---

<div class="post-metadata">

**Author:** ![tobiasbalzano](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/tobiasbalzano/32/51_2.png) [@tobiasbalzano](https://forum.litium.com/u/tobiasbalzano)\
**Post date:** [June 7, 2019, 12:02pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/4 "2019-06-07T12:02:46Z")

</div>

I have a custom IPriceAgentItemFactory set up to do just that, and as far as I can tell I can add my fields on PriceAgentItemResult.Properties, is that how I’m supposed to do it? I can see that the Google Shopping agent already returns fields as empty that I want to populate myself, if I add my own key called “google\_​​product\_​​category” it’ll use it instead?  
I can’t get my feed to save correctly on my dev environment, currently only our production env. actually displays the feed that’s why I’m asking instead of just trying myself 🙂

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [June 7, 2019, 12:27pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/5 "2019-06-07T12:27:53Z")

</div>

If you are not implementing a custom GoogleShoppingPriceAgent then you need to set “GoogleProductCategory” as peroperty name/id.  
`priceAgentItemResult.Properties["GoogleProductCategory"] = GoogleShoppingCategoryId;`

---

<div class="post-metadata">

**Author:** ![tobiasbalzano](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/tobiasbalzano/32/51_2.png) [@tobiasbalzano](https://forum.litium.com/u/tobiasbalzano)\
**Post date:** [June 7, 2019, 12:31pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/6 "2019-06-07T12:31:33Z")

</div>

Ok, I can have a look at the GoogleShoppingPriceAgent to see how I need to name my properties, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [July 5, 2019, 12:31pm UTC](https://forum.litium.com/t/custom-google-shopping-feed/905/7 "2019-07-05T12:31:37Z")

</div>

Closed on July 5, 2019, 12:31pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
