younifyd
Menu

company

Fetch a single company by its ID.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the company action (under Company).
  3. Fill in the fields below, then reference the result from later steps as {{company.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query Company($id: ID!) {
  company(id: $id) {
    contactCount
    contactsCount {
      count
      precision
    }
    createdAt
    customerSince
    defaultCursor
    defaultRole {
      id
      name
      note
    }
    externalId
    hasTimelineComment
    id
    lifetimeDuration
    locationsCount {
      count
      precision
    }
    mainContact {
      company
      createdAt
      customer {
        amountSpent
        canDelete
        companyContactProfiles
        createdAt
        dataSaleOptOut
        defaultAddress
        defaultEmailAddress
        defaultPhoneNumber
        displayName
        email
        emailMarketingConsent
        firstName
        hasTimelineComment
        id
        identityProviderSubjects
        lastName
        lastOrder
        legacyResourceId
        lifetimeDuration
        locale
        market
        mergeable
        multipassIdentifier
        note
        numberOfOrders
        phone
        productSubscriberStatus
        smsMarketingConsent
        state
        statistics
        tags
        taxExempt
        taxExemptions
        taxSettings
        unsubscribeUrl
        updatedAt
        validEmailAddress
        verifiedEmail
      }
      id
      isMainContact
      lifetimeDuration
      locale
      title
      updatedAt
    }
    name
    note
    ordersCount {
      count
      precision
    }
    totalSpent {
      amount
      currencyCode
    }
    updatedAt
  }
}

Variables

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

idstringrequired

The ID of the `Company` to return.

json
{
  "id": "string"
}

Response

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

contactCountnumber
contactsCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

createdAtstring
customerSincestring
defaultCursorstring
defaultRoleobject
idstring
namestring
notestring
externalIdstring
hasTimelineCommentboolean
idstring
lifetimeDurationstring
locationsCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

mainContactobject
companyobject

Recursive reference to Company, not further expanded.

createdAtstring
customerobject38 fields
idstring
isMainContactboolean
lifetimeDurationstring
localestring
titlestring
updatedAtstring
namestring
notestring
ordersCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

totalSpentobject
amountstring
currencyCodestring

One ofUSDEURGBPCADAFNALLDZDAOAARSAMDAWGAUDBBDAZNBDTBSDBHDBIFBYNBZDBMDBTNBAMBRLBOBBWPBNDBGNMMKKHRCVEKYDXAFCLPCNYCOPKMFCDFCRCHRK

updatedAtstring

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