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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Shopify B2B Company Sync Error – String Length Exceeds 50 Characters

(3) ShareShare
ReportReport
Posted on by 11,150 Super User 2025 Season 2

Hi everyone,

I'm currently syncing B2B companies from Shopify to Business Central using the standard Shopify connector. Everything was working fine until I hit an issue with syncing one specific company.

The sync fails with the following error:

 

"The length of the string is 63, but it must be less than or equal to 50 characters. Value: Office 809, Tameem House Office Building, Barsha Heights, Tecom"

From what I can tell, this value seems to be the company name or address field from Shopify. However, I checked the Shopify Company table in Business Central (Shopify B2B Company), and the field length is set to 500 characters — and strangely, I have other companies with longer names syncing without any issues.

Has anyone else come across this?

Could this be related to another underlying table or mapping not visible in the UI?

I’ve reviewed the official Microsoft documentation for the Shopify B2B connector, but couldn’t find any reference to this field limitation.

Any suggestions, ideas, or blog links would be appreciated!

Thanks!

I have the same question (0)
  • Verified answer
    Sagar Dangar, MCP Profile Picture
    799 Super User 2025 Season 2 on at
    Hi,
     
    I think Issue is in Address 2 field mapping data from shopify
     
    Check the mapping of "Address 2 (5, Text[50])"  field in company information in BC with shopify company table.
  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at
    Error message is very clean as it's saying character length is exceeding. As it's standard functionality so if data can be controlled to its defined length then great or else need to extended it via program. See if we have Address and Address 2 and can be handled on this. 
     
  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,351 Super User 2025 Season 2 on at
    You're encountering a string length validation error when syncing a B2B company from Shopify to Dynamics 365 Business Central via the standard Shopify connector:
    "The length of the string is 63, but it must be less than or equal to 50 characters."
    Even though the Shopify B2B Company table shows a field length of 500 characters, the issue does not stem from that table directly. This type of error usually indicates a limitation in the Business Central base tables or intermediary mapping tables used during the integration.

    Root Cause
    The Shopify connector syncs Shopify B2B company data into multiple Business Central tables, not just Shopify B2B Company. One of these underlying tables or mapping layers likely has a field with a 50-character limit — even though the source and visible target appear to allow more.
    Common culprits:
    • Customer table in BC (Name, Address, or Address 2 fields — most limited to 50 characters).
    • Mappings defined in the Shopify Integration Codeunit, especially in the codeunit Custom Shopify Mapping or Shopify Customer Processor.

    🔧 Solution
    You can resolve this using one of the following approaches:

    Option 1: Truncate or Cleanse Data During Sync
    Modify the custom mapping extension to truncate or handle strings that exceed allowed lengths.
    Steps:
    1. Create a new AL extension to subscribe to the integration event (e.g. in Shopify Customer Processor or Shopify Company Processor).
    2. Use the event subscriber to truncate the offending value to 50 characters before it's passed into the base BC tables.
    al       CopyEdit
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Shopify Company Processor", 'OnBeforeInsertCustomer', '', false, false)]
    local procedure HandleOnBeforeInsertCustomer(var Rec: Record Customer)
    begin
        if StrLen(Rec.Name) > 50 then
            Rec.Name := CopyStr(Rec.Name, 1, 50);

        if StrLen(Rec.Address) > 50 then
            Rec.Address := CopyStr(Rec.Address, 1, 50);
    end;
    🔒 This preserves sync stability without altering Shopify data.

    Option 2: Adjust Data in Shopify
    If modifying AL code is not ideal, you can implement a workaround on the Shopify side:
    • Use Shopify Flow or API to truncate or cleanse the specific field (likely address or company name) before it reaches BC.
    • This is less robust but works in simpler setups.

    Option 3: Identify the Limiting Field in BC
    If you'd rather identify exactly which field is causing the issue, you can:
    1. Open VS Code and download symbols for your Business Central app.
    2. Search for the relevant Shopify integration codeunits:
      Look for usages of
      COPYSTR, VALIDATE, or INSERT in:
      • Shopify Customer Processor
      • Shopify Company Processor
    3. Check the target table’s field lengths (e.g., Customer.Name, Customer.Address, etc.).
    This helps pinpoint the failing field (almost certainly one with a 50-character max).

    Recommended: Add Custom Handling Logic
    Best practice is to build a small AL extension to sanitize incoming data. This is especially important for B2B syncs where address fields often exceed BC limits.
  • Verified answer
    Sohail Ahmed Profile Picture
    11,150 Super User 2025 Season 2 on at

    Thank you, everyone!

     

    I found the issue — the problem was with the Address 2 field. In the Shopify Address table, Address 2 allows up to 100 characters, but in Business Central, the Customer table only allows 50 characters for Address 2. This mismatch was causing the sync to fail. Trimming the field resolved the issue. (As Address 2 was not that much important for my situation)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans