Update Shopify Order Metafield with Customer Company Name | MESA

Update Shopify Order Metafield with Customer Company Name

4 min setup
No coding required
Runs automatically

Automatically capture your customer's company name from each new Shopify order and store it in order metafields. This workflow enriches your order data with business identifiers, making it easier to track and report on B2B accounts, manage wholesale relationships, and analyze order activity by customer organization. Perfect for merchants selling to multiple business clients who need accurate company-level insights for operations, fulfillment, and customer service.

How it works

3 steps to start automatically updating order metafields with customer company names from Shopify Plus B2B data

Order Created

App connector: [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: This trigger detects every new B2B order and initiates the process of capturing company information that would otherwise require manual lookup and data entry.

This step automatically monitors your Shopify store for new orders and kicks off the workflow whenever a B2B customer places an order. The trigger captures essential order details including the customer's company location ID, which gets passed to the next step for company name retrieval.

Retrieve Company Location

App connector: [Shopify Plus](/content/apps/shopify-plus/integrate "View Shopify Plus integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: This step fetches the actual company name from Shopify Plus's B2B system using the company location ID from the order, providing the specific data needed for the metafield update.

This step connects to your Shopify Plus B2B system and retrieves the complete company location details using the company location ID captured from the order trigger. The workflow automatically pulls the company name, address, and other location-specific information that B2B customers have registered in your store. This data retrieval happens seamlessly in the background and passes the company name to the final step.

Set Order Metafield

App connector: [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 2 minutes

Why this matters: This step permanently stores the company name as structured data on the order record, making it searchable and accessible for reporting, filtering, and business analysis across your entire order management system.

This step creates a custom metafield on the order record and populates it with the company name retrieved from the previous step. The metafield uses the namespace "custom" with the key "customer_company_name" and stores the data as single-line text for easy access and reporting. You can customize the namespace and key names to match your existing metafield structure or reporting requirements.

Frequently asked questions

Will this work for regular B2C customers who don't have company associations?

No, this workflow specifically requires B2B customer data from Shopify Plus. If a regular customer places an order without company information, the "Retrieve Company Location" step will fail to find data and the metafield won't be created.

Can I use this company name data to segment customers in Shopify's native reports?

Yes, once the company name is stored as a metafield, you can use it in Shopify's order reports and filters. You can also export this data to build custom company performance reports or integrate with business intelligence tools.

What happens if a B2B customer changes their company name or location details?

The workflow only captures company information at the time each order is created, so existing order metafields won't automatically update when company details change. New orders will reflect the updated company information, but historical order records will maintain the company name that was current when originally processed.