Company Location Action: Set a company location metafield value
The Set a Company Location Metafield Value Action allows your Workflow to update metafields on individual company locations in Shopify B2B. This is helpful when enriching B2B location data, syncing external system attributes, tracking statuses, or automating location-specific logic inside company Workflows.
Important Requirement
To use this Action, your Workflow must include a Company Location loop step. Company Workflows run at the company level, not at the company location level, so a loop is required to target each location individually. Inside that loop, you can add the Set a Company Location Metafield Value Action to update the metafield for the specific location being iterated.
Configuring the Action
After adding a Company Location loop to your Workflow, add an Action inside the loop and choose Set a Company Location Metafield Value. Use the fields below to define which metafield to update and the value that should be applied.
| Field Name | Description | Example |
|---|---|---|
| Defined/Undefined field | If your company location metafield is already defined in Shopify, toggle the metafield definition | Metafield Definition |
| Metafield Namespace | The namespace of the metafield to update. Namespaces organize metafields into logical groups. | custom |
| Metafield Key | The key of the metafield. Together, the namespace and key uniquely identify the metafield. | location_status |
| Metafield Value Type | The type of data stored in the metafield, such as string, integer, boolean, or json. | Legacy String |
| Metafield Value | The value to write to the metafield. You may use Tokens from the company or company location object during the loop. | Active |
Troubleshooting & Usage Tips
Metafield not updating: Verify that the namespace and key exactly match the metafield definition in Shopify. Also confirm that the metafield type aligns with the value you are providing.
Credit Cost
The Set a Company Location Metafield Value Action incurs a cost of one Action Credit on Lite plans and is unlimited on Unlimited plans.
Custom Actions
The Set a Company Location Metafield Value Action within Custom Actions is fully supported. Additional information and examples are available in the documentation.