younifyd
Menu

companyUpdate

Updates a Company with new information. Companies represent business customers that can have multiple contacts and locations with specific pricing, payment terms, and checkout settings.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the companyUpdate action (under Company).
  3. Fill in the fields below, then reference the result from later steps as {{companyupdate.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 CompanyUpdate($companyId: ID!, $input: CompanyInput!) {
  companyUpdate(companyId: $companyId, 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.

companyIdstringrequired

The ID of the company to be updated.

inputobjectrequired

The input fields to update the company.

namestring
notestring
externalIdstring
customerSincestring
json
{
  "companyId": "string",
  "input": {
    "name": "string",
    "note": "string",
    "externalId": "string",
    "customerSince": "string"
  }
}

Response

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

companyobject
contactCountnumber
contactsCountobject2 fields
createdAtstring
customerSincestring
defaultCursorstring
defaultRoleobject3 fields
externalIdstring
hasTimelineCommentboolean
idstring
lifetimeDurationstring
locationsCountobject2 fields
mainContactobject9 fields
namestring
notestring
ordersCountobject2 fields
totalSpentobject2 fields
updatedAtstring
userErrorsarray<object>
codeobject
fieldobject
messageobject

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

companyUpdate — Shopify — Documentation