younifyd
Menu

companyLocationCreate

Creates a new location for a Company. Company locations are branches or offices where B2B customers can place orders with specific pricing, catalogs, and payment terms.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the companyLocationCreate action (under Company).
  3. Fill in the fields below, then reference the result from later steps as {{companylocationcreate.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 CompanyLocationCreate($companyId: ID!, $input: CompanyLocationInput!) {
  companyLocationCreate(companyId: $companyId, input: $input) {
    companyLocation {
      billingAddress {
        address1
        address2
        city
        companyName
        country
        countryCode
        createdAt
        firstName
        formattedArea
        id
        lastName
        phone
        province
        recipient
        updatedAt
        zip
        zoneCode
      }
      buyerExperienceConfiguration {
        checkoutToDraft
        deposit
        editableShippingAddress
        payNowOnly
        paymentTermsTemplate
      }
      company {
        contactCount
        contactsCount
        createdAt
        customerSince
        defaultCursor
        defaultRole
        externalId
        hasTimelineComment
        id
        lifetimeDuration
        locationsCount
        mainContact
        name
        note
        ordersCount
        totalSpent
        updatedAt
      }
      createdAt
      currency
      defaultCursor
      externalId
      hasTimelineComment
      id
      locale
      market {
        catalogsCount
        conditions
        currencySettings
        delivery
        discountsCount
        enabled
        handle
        id
        name
        priceInclusions
        priceList
        primary
        status
        type
        webPresence
      }
      name
      note
      orderCount
      ordersCount {
        count
        precision
      }
      phone
      shippingAddress {
        address1
        address2
        city
        companyName
        country
        countryCode
        createdAt
        firstName
        formattedArea
        id
        lastName
        phone
        province
        recipient
        updatedAt
        zip
        zoneCode
      }
      taxExemptions
      taxRegistrationId
      taxSettings {
        taxExempt
        taxExemptions
        taxRegistrationId
      }
      totalSpent {
        amount
        currencyCode
      }
      updatedAt
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

companyIdstringrequired

The ID of the company that the company location belongs to.

inputobjectrequired

The fields to use to create the company location.

namestring
phonestring
localestring
externalIdstring
notestring
buyerExperienceConfigurationobject4 fields
billingAddressobject10 fields
shippingAddressobject10 fields
billingSameAsShippingboolean
taxRegistrationIdstring
taxExemptionsarray<string>
taxExemptboolean
json
{
  "companyId": "string",
  "input": {
    "name": "string",
    "phone": "string",
    "locale": "string",
    "externalId": "string",
    "note": "string",
    "buyerExperienceConfiguration": {
      "checkoutToDraft": false,
      "paymentTermsTemplateId": "string",
      "editableShippingAddress": false,
      "deposit": {
        "percentage": "string"
      }
    },
    "billingAddress": {
      "address1": "string",
      "address2": "string",
      "city": "string",
      "zip": "string",
      "recipient": "string",
      "firstName": "string",
      "lastName": "string",
      "phone": "string",
      "zoneCode": "string",
      "countryCode": "AF"
    },
    "shippingAddress": {
      "address1": "string",
      "address2": "string",
      "city": "string",
      "zip": "string",
      "recipient": "string",
      "firstName": "string",
      "lastName": "string",
      "phone": "string",
      "zoneCode": "string",
      "countryCode": "AF"
    },
    "billingSameAsShipping": false,
    "taxRegistrationId": "string",
    "taxExemptions": [
      "CA_STATUS_CARD_EXEMPTION"
    ],
    "taxExempt": false
  }
}

Response

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

companyLocationobject
billingAddressobject17 fields
buyerExperienceConfigurationobject5 fields
companyobject17 fields
createdAtstring
currencystring

One ofUSDEURGBPCADAFNALLDZDAOAARSAMDAWGAUDBBDAZNBDTBSDBHDBIFBYNBZDBMDBTNBAMBRLBOBBWPBNDBGNMMKKHRCVEKYDXAFCLPCNYCOPKMFCDFCRCHRK

defaultCursorstring
externalIdstring
hasTimelineCommentboolean
idstring
localestring
marketobject15 fields
namestring
notestring
orderCountnumber
ordersCountobject2 fields
phonestring
shippingAddressobject17 fields
taxExemptionsarray<object>
taxRegistrationIdstring
taxSettingsobject3 fields
totalSpentobject2 fields
updatedAtstring
userErrorsarray<object>
codeobject
fieldobject
messageobject

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