Skip to main content
Answer

Sync sales categories to Shopify metafield

  • February 11, 2023
  • 13 replies
  • 253 views

Forum|alt.badge.img

Currently on 21R1, in the process of upgrading to 22R2 - is it possible in 22R2 to map product Sales Categories to a product/variant metafield in Shopify?

Best answer by michaelho

@Yuri Karpenko - I see, so it would just be an import of the GI results based on the last modified field, set on a schedule that corresponds to the last modified date filter. 

Out of curiosity - couldn’t this same thing be done by creating an Import Scenario off of a GI result, and then an Automation Schedule on the Process Import Scenarios screen (SM206035)? Not sure I understand the benefits of using a Business Event for this instead?

13 replies

Yuri Karpenko
Captain II
Forum|alt.badge.img+6
  • Captain II
  • February 11, 2023

Hi @mikeho , no, this is impossible. 2 data types are incompatible. In Acumatica (just like in Shopify) a product can be assigned to multiple sales categories. So, it’s one-to-many relationship. At the same time, if you were to populate a metafield for a product, it would be a one-to-one relationship. Also, sales categories are tiered (parent-child structure), while metafields are flat.

What’s your business case?

If you wanted to put 1 data point from Acumatica to a meatfield in Shopify, I would recommend using an Attribute in Acumatica and map to a metafield in Shopify.

Hope this helps.


PatrickSchlenker90
Varsity III
Forum|alt.badge.img+1

Hi @mikeho, i suggest to use the attributes to provide such kind of data (as already mentioned). Attributes in Acumatica you can mapp to the metafields in shopify. 


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • February 13, 2023

Hi @Yuri Karpenko & @PatrickSchlenker90 - using the tiered, category tree structure in Acumatica is preferable for managing product categories as we have over 50k products so trying to manage these by attributes just isn’t tenable. And the reason for syncing them to a metafield in Shopify is for backend categorization processes.

It sounds like if we did want to use sales categories in Acumatica then we’d need to create a customization to pull them into a single field that we can map to a metafield in Shopify?


Yuri Karpenko
Captain II
Forum|alt.badge.img+6
  • Captain II
  • February 13, 2023

@mikeho , in this situation, I would recommend keep using Sales Categories in Acumatica as designed. Then create an Attribute in Acumatica to hold the value you need from the Sales Categories (text field), then create a Business Event to watch for changes in Sales Categories per product, and trigger an update to that Attribute when a change is detected. And then map that Attribute to a meta-field in Shopify. Does it make sense?


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • February 14, 2023

@Yuri Karpenko - that sounds like that would work for our needs. Would you happen to be able to provide the steps for setting up a Business Event to update an Attribute based on a change to the Sales Categories? I’ve had some misfires when I’ve tried to so something similar in the past.


Yuri Karpenko
Captain II
Forum|alt.badge.img+6
  • Captain II
  • February 14, 2023

@mikeho , for this specific scenario, I would recommend setting up a GI with Sales Categories and SKUs (INItemCategory and InventoryItem tables), and then set up a schedule to run the business event. I wouldn’t recommend doing a trigger by record change, because that can be finicky. Hope this helps.


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • February 15, 2023

@Yuri Karpenko - thank you! I’m still a little unclear how you would use the Business Event in conjunction with the GI to update this attribute field. Can you provide more clarification?


Yuri Karpenko
Captain II
Forum|alt.badge.img+6
  • Captain II
  • February 20, 2023

Hi @mikeho , sorry for my late reply. But most Business Events are based on the GI. You build a GI that has a list of all your SKUs, inner joined with Sales Categories and filtered on LastUpdatedDateTime field, so you only see items that were updated in the last 30 minutes, for instance. And then you set up a Schedule to run every 30 minutes to grab the data from the GI and update those SKUs attributes.

It’s hard to provide exact details though.


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • Answer
  • February 20, 2023

@Yuri Karpenko - I see, so it would just be an import of the GI results based on the last modified field, set on a schedule that corresponds to the last modified date filter. 

Out of curiosity - couldn’t this same thing be done by creating an Import Scenario off of a GI result, and then an Automation Schedule on the Process Import Scenarios screen (SM206035)? Not sure I understand the benefits of using a Business Event for this instead?


Yuri Karpenko
Captain II
Forum|alt.badge.img+6
  • Captain II
  • February 21, 2023

@mikeho , I think you can get away without Business Event in this case, actually. Good thinking!


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • February 22, 2023

Thanks, @Yuri Karpenko !


Forum|alt.badge.img
  • Freshman I
  • September 4, 2025

Many people use collections for Shopify categories

Shopify can now automatically put items into a collections based a metafield

(this used to only be possible with tags)

 

So why should i not be able to export the Acumatica sales category to a Shopify metafield..


Yuri Karpenko
Captain II
Forum|alt.badge.img+6
  • Captain II
  • September 4, 2025

@Jonathanr , you can export an attribute to a metafield. You cannot export sales categories to Shopify metafield, because you can have multiple sales categories in Acumatica (it’s unstructured data, a list, variable length, null allowed, etc.). Technically, what you’re asking for is possible. But you need to write code in Acumatica to preprocess data, and then map it to a metafield in Shopify.

You can probably do this easier by using a product attribute in Acumatica, and no customization is required.