Skip to content
  • There are no suggestions because the search field is empty.

Shopify Setup - B2B

Synchronize Shopify B2B companies, contacts, locations, and contact roles with Business Central, and process B2B orders against the right customer.

    Configure the Sales Channel for B2B

    On the sales channel, General FastTab, turn on Enable B2B Features.

    A B2B FastTab then appears with four fields.

    Field Values Purpose
    New B2B Customer Template Code Customer Template Used when CSM creates a Business Central customer for a company. The template must have a No. Series.
    New Company Behavior Manual / Auto Create
    Default: Manual
    What happens when an order arrives for a company CSM does not recognize.
    New Company Contact Behavior Manual / Auto Create
    Default: Manual
    Applies only when a company was just auto-created.
    New Company Location Behavior Manual / Auto Create
    Default: Manual
    Applies only when a company was just auto-created.

    Two navigation actions are added under Actions › B2B: Companies and Contact Roles, each filtered to this channel.

     

    Note: Amount Source (Shop or Presentment currency) sits on the Order Management FastTab under Additional Settings. It affects all orders, not just B2B, and is a temporary setting pending API mapping support.

     

    Retrieve B2B Companies

    Open CSM Companies filtered to your sales channel and choose Actions › Retrieve from channel › Companies. Retrieval brings back the company name, External ID, and channel status.

    Retrieval is incremental — after the first run, only companies updated since the last run are fetched. The list must be filtered to a single sales channel or the action errors with No filter found for CSM Sales Channel.

     

    Link the Company to a Business Central Customer

    On the CSM Company card, set BC Customer No. CSM copies the customer name onto the company and then offers to create contacts and locations from the customer's Business Central contacts and ship-to addresses:

    • All Contacts & Locations — create records for every BC contact and ship-to address
    • Selected Contacts and Locations — choose which to create
    • None — link the customer only

    If no customer exists yet, use Actions › Synchronize › To BC customer. When New Customer Behavior is Auto Create, this creates a customer from the B2B customer template and links it.

     

    Company Contacts and Locations

    On the company card, use Actions › Retrieve from channel › Contacts and Locations. Both require the company to have an External ID; without one they do nothing and report nothing.

    Retrieving contacts also maintains the company's Main Contact automatically — the contact Shopify flags as the main contact is written to the company's Main Contact field.

    To send records the other way, use Actions › Send to channel › Contact or Location. CSM creates the record on Shopify when the External ID is blank and updates it when one is present.

     

    Contact Roles on Shopify

    Shopify contact roles belong to an individual company, not to the whole store, and a role is assigned per location. This differs from other CSM channels.

    Two consequences:

    • Retrieve roles from the CSM Company card or list — Actions › Retrieve from channel › Retrieve company contact roles — one company at a time. The Retrieve from Channel and Send to channel actions on the CSM Contact Roles page are not implemented for Shopify.
    • Do not use the single Role field on a company contact. On a Shopify channel it is blocked, and selecting it returns Field not used for Shopify. Use Role Assignments by location instead.

    Roles retrieved from Shopify appear on the CSM Contact Roles page with Role Name plus the read-only CSM Company ID and CSM Company Name showing which company they belong to.

     

    Assigning Roles

    Open the CSM Company Contact card and use the Role Assignments section. Each assignment pairs a Location Name with a Role Name. Send them with either:

    • Send Role Assignment on an individual assignment line — reassigns in a single call when the assignment already exists on Shopify
    • Actions › Send to channel › Role Assignments on the contact — sends all assignments for that contact

    The contact must have an External ID first, or the action errors with The CSM Company Contact must have an External ID to be able to send role assignments to the channel.

     

    Assign the Main Contact

    On the CSM Company card, set Main Contact Name, then choose Actions › Send to channel › Send Main Contact to channel.

    Two conditions are checked and reported as errors:

    • CSM Company %1 must have an External ID to be able to assign main contact
    • CSM Company %1 must have a Main Contact assigned to it.

     

    B2B Automations

    Search API Automation and open the automation group B2B_MANAGEMENT_<sales channel code>. Each sales channel has its own group.

    Step Direction Enabled by default
    GET_COMPANIES Inbound No
    GET_COMPANY_CONTACT_ROLES Inbound Yes
    GET_CONTACTS Inbound No
    GET_LOCATIONS Inbound No
    SEND_COMPANIES Outbound No
    SEND_CONTACTS Outbound No
    SEND_LOCATIONS Outbound No
    SEND_COMPANY_MAIN_CONTACT Outbound Yes
    SEND_CONTACT_ROLE_ASSIGNMENT Outbound No

    Inbound steps run every 15 minutes, outbound every 10 minutes. Enable the steps you need — only two ship enabled.

    The three bulk send steps carry the property REQUIRE_UPDATE_ONLY, set to true, so they send only records flagged External Requires Update. Any edit to a company, contact, or location sets that flag automatically.

    Every automation step skips companies with a blank External ID. A company that has never been sent to Shopify is never picked up by an automation — send it once manually first.

    Run the group on demand from the CSM Administrator Role Center with Run B2B Automation Now, or from the API Automation page.

     

    B2B Orders

    B2B orders arrive through the standard order automation. A B2B FastTab on the CSM Order shows the purchasing entity fields: company ID, company name, contact ID and title, location ID and name, location tax ID, and the buyer's customer ID, email, and name. The order also carries Is Business Order and Purchase Order Number on the Information area.

    Note

    The B2B FastTab is hidden on any order with a blank Purchasing Entity Company ID, even on a B2B-enabled channel. A missing tab usually means the order was placed through the storefront rather than B2B.

     

    How CSM matches an Order to a Customer

    CSM finds the CSM Company whose External ID equals the order's Purchasing Entity Company ID, then uses that company's BC Customer No. Matching is by External ID only — never by name or email.

    If no match is found:

    • New Company Behavior = Manual — the order errors with a message stating that a CSM Company must be created and linked to a customer first.
    • New Company Behavior = Auto Create — CSM creates the CSM Company (and, if configured, contact and location) from the order data with status Approved, then still stops the order so you can link a Business Central customer.

    Auto Create is a scaffolding aid, not a hands-free path. In both cases the order waits until a customer is linked, after which it reprocesses normally.

     

    Actions Not Available on Shopify

    These actions appear in the interface because they are shared across all CSM channels, but have no Shopify implementation. They report an error status on the record rather than raising a dialog.

    • Send to channel › Company status — for channels with a dedicated status API
    • Retrieve from channel › Company (single) — reports "This functionality to be added in a future release"
    • Retrieve from channel › Contact and Location (single) — not yet implemented
    • Both actions on the CSM Contact Roles page — use Retrieve company contact roles on the company instead

     

    Troubleshooting

    Symptom Cause and fix
    An action appears to do nothing Check Last External Update Status and Last External Update Result on the record. "Not implemented" means the API Engine Execution Module is missing or has no row for that operation.
    Retrieve Contacts or Locations does nothing The company has no External ID. Send the company to Shopify first, or retrieve companies.
    Automations skip a company Blank External ID, or External Requires Update is not set and the step is filtered to updates only.
    Cannot set a Role on a contact Correct for Shopify. Use Role Assignments by location instead.
    Subscription errors on every call The B2B Management subscription is not in good standing. Check CSM Setup.
    Company name keeps overwriting Name synchronization can be suppressed with CSM Sales Operation Rules B2B-S-COMP-NAME (BC to CSM) and B2B-U-COMP-NAME (CSM to BC).