web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Shopify Metafield Syncing from business central

(3) ShareShare
ReportReport
Posted on by 181
I'm looking at the documentation on how to link metafields in Shopify to fields in Business Central but the most I can get is in the following image:
 
 
Does anyone have information on the extensibility model they are referring to? Is the feature of creating table/page extensions in AL to add data columns to the objects?
 
If that's the case, how do you extend the data from the shopify query itself to either import or export to shopify?
 
Does anyone have any insight to this problem?
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    16,423 Super User 2026 Season 1 on at
    Hello,
    It’s basically AL extensibility through Shopify Connector events, not just adding fields with table/page extensions. You can add custom fields in Business Central, but they won’t sync by themselves. To import/export metafields, you need to use the connector’s exposed events, mainly around Shpfy Product Events, to map BC fields or related data to Shopify metafields and handle incoming metafield data. Also, if your question is about changing the actual Shopify API query/payload, per-tenant extensions can’t do that—Microsoft says you can adjust flows through events, but not modify API calls; for that you’d need the hybrid approach with your own Shopify app/API logic.
     
    Regards,
    Oussama Sabbouh
  • SH-13061534-0 Profile Picture
    181 on at
    Below is my code so far everything runs but the owner ID is set to 0 because the product isn't created yet. The documentation says that the product id should be pulled when the response from shopify is obtained and then the metafield data is push, but it isn't working as the metafields in shopify are still blank:
     
    codeunit 50500 "Vendor No Shopify Metafield"
    {
        SingleInstance = true;
     
        // ---------------------------------------------------------
        // Phase 1: Prepare metafield value during export
        // ---------------------------------------------------------
        [EventSubscriber(
            ObjectType::Codeunit,
            Codeunit::"Shpfy Product Events",
            'OnAfterCreateTempShopifyProduct',
            '',
            false,
            false)]
        local procedure AddVendorNoMetafield(
            Item: Record Item;
            var ShopifyProduct: Record "Shpfy Product";
            var ShopifyVariant: Record "Shpfy Variant";
            var ShopifyTag: Record "Shpfy Tag")
        var
            Metafield: Record "Shpfy Metafield";
        begin
            Message(
            'Temp Shopify product created for Item %1, ShopifyProduct.Id=%2',
            Item."No.",
            ShopifyProduct.Id
            );
     
            if Item."Vendor No." = '' then
                exit;
     
            Metafield.Init();
            Metafield."Owner Type" := Metafield."Owner Type"::Product;
            Metafield."Owner Id" := ShopifyProduct.Id; // 0 is OK for new products
            Metafield.Namespace := 'custom';
            Metafield.Name := 'brand';
            Metafield."Value Type" := Metafield."Value Type"::String;
            Metafield.Value := Item."Vendor No.";
     
            if not Metafield.Insert() then
                Metafield.Modify();
        end;
     
    }
  • Suggested answer
    YUN ZHU Profile Picture
    101,250 Super User 2026 Season 1 on at
    Hi, hope the following can give you some hints.
    Populate fields on an imported Shopify order:
     
    Thanks.
    ZHU
  • SH-13061534-0 Profile Picture
    181 on at
    Hi YUN,
     
    It seems simpler dealing with import to business central than exports. I'm ultimately trying to sync metafields on shopify's products to fields on the business central items page.
     
    Our internal company flow is that items are created/updated in Business central and pushed to shopify. The issue is that for newly created items, you need to call the shopify API to create the item, wait for a response to get the product ID to then be used in metafieldset API call to set the metafields. I followed some similar code from microsoft but aren't getting through to push the metafield data.
     
    I use the OnAfterCreateTempShopify Product event to successfully execute a procedure but that that point, the product id value is 0 so I'm not sure if that is causing an issue.
     
    Any event i try for updates aren't successfully being triggered.
     
    Do you have any more knowledge?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,140 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,362 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,216

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans