Skip to content

Company - Assign Customer As Contacts

The Company - Assign Customer As Contacts push makes an existing customer a contact of a B2B company, someone who can buy for it. Each record assigns one customer to one company.

On a push connector, select Company - Assign Customer As Contacts as the Shopify Import Type. The push sends each record through Shopify's companyAssignCustomerAsContact mutation. See Building a B2B Customer for where it fits.

Fields

Field Rule
Company Id Required. The company, as a gid such as gid://shopify/Company/1234567890
Customer Id Required. The customer, as a gid such as gid://shopify/Customer/1234567890
Contact Id Written back with the new contact's gid, for Company - Contact Assign Roles

Give both ids as gids. The Companies push writes back a gid Company Id. The Customers push writes back a numeric Customer Id. Build the gid in a Map transform, for example:

"gid://shopify/Customer/" & %id

Shopify refuses to assign a customer who is already a contact of the company. Each record is an insert.

Access Scopes

The push needs write_companies. See Access Scopes.

Shopify Reference

companyAssignCustomerAsContact in Shopify's GraphQL Admin API reference.