younifyd
Menu

company_registerCompany

Register a new company for B2B.

Use it in a workflow

  1. Add a step and choose the BigCommerce Storefront connector.
  2. Pick the company_registerCompany action (under Register).
  3. Fill in the fields below, then reference the result from later steps as {{companyRegistercompany.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.

graphql
mutation CompanyRegisterCompany($input: RegisterCompanyInput!) {
  company {
    registerCompany(input: $input) {
      entityId
      status
      errors {
        __typename
        ... on ValidationError {
          path
          message
        }
      }
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

inputobjectrequired

The values to use for company registration.

namestringrequired
emailstringrequired
phonestringrequired
fileListarray<object>5 fields
companyUserobject1 fields
extraFieldsobject4 fields
addressobjectrequired11 fields
json
{
  "input": {
    "name": "string",
    "email": "string",
    "phone": "string",
    "address": {
      "firstName": "string",
      "lastName": "string",
      "address1": "string",
      "city": "string",
      "countryCode": "string",
      "address2": "string",
      "stateOrProvince": "string",
      "phone": "string",
      "postalCode": "string",
      "label": "string",
      "extraFields": {
        "multipleChoices": "string",
        "numbers": "string",
        "texts": "string",
        "multilineTexts": "string"
      }
    },
    "fileList": [
      {
        "fileId": "string",
        "fileUrl": "string",
        "fileName": "string",
        "contentType": "string",
        "fileSize": "string"
      }
    ],
    "companyUser": {
      "extraFields": {
        "multipleChoices": "string",
        "numbers": "string",
        "texts": "string",
        "multilineTexts": "string"
      }
    },
    "extraFields": {
      "multipleChoices": [
        "string"
      ],
      "numbers": [
        "string"
      ],
      "texts": [
        "string"
      ],
      "multilineTexts": [
        "string"
      ]
    }
  }
}

Response

Read the result with {{companyRegistercompany.response.data.data.registerCompany}}. If the API returns errors, the step fails and they are at {{companyRegistercompany.response.data.errors}}.

entityIdnumber
statusstring

One ofAPPROVEDDELETEDINACTIVEPENDINGREJECTED

errorsarray<object>
pathobject
messageobject

Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.