Menu
companyCreate
Creates a Company for B2B commerce. This mutation creates the company and can optionally create an initial CompanyContact and CompanyLocation in a single operation.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the companyCreate action (under Company).
- Fill in the fields below, then reference the result from later steps as
{{companycreate.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation CompanyCreate($input: CompanyCreateInput!) {
companyCreate(input: $input) {
company {
contactCount
contactsCount {
count
precision
}
createdAt
customerSince
defaultCursor
defaultRole {
id
name
note
}
externalId
hasTimelineComment
id
lifetimeDuration
locationsCount {
count
precision
}
mainContact {
company
createdAt
customer
id
isMainContact
lifetimeDuration
locale
title
updatedAt
}
name
note
ordersCount {
count
precision
}
totalSpent {
amount
currencyCode
}
updatedAt
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"input": {
"company": {
"name": "string",
"note": "string",
"externalId": "string",
"customerSince": "string"
},
"companyContact": {
"firstName": "string",
"lastName": "string",
"email": "string",
"title": "string",
"locale": "string",
"phone": "string"
},
"companyLocation": {
"name": "string",
"phone": "string",
"locale": "string",
"externalId": "string",
"note": "string",
"buyerExperienceConfiguration": {
"checkoutToDraft": "string",
"paymentTermsTemplateId": "string",
"editableShippingAddress": "string",
"deposit": "string"
},
"billingAddress": {
"address1": "string",
"address2": "string",
"city": "string",
"zip": "string",
"recipient": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"zoneCode": "string",
"countryCode": "string"
},
"shippingAddress": {
"address1": "string",
"address2": "string",
"city": "string",
"zip": "string",
"recipient": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"zoneCode": "string",
"countryCode": "string"
},
"billingSameAsShipping": false,
"taxRegistrationId": "string",
"taxExemptions": [
"string"
],
"taxExempt": false
}
}
}
Response
Read the result with {{companycreate.response.data.data.companyCreate}}. If the API returns errors, the step fails and they are at {{companycreate.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?