younifyd
Menu

orderAttributionDefinitionUpsert

Upserts an order attribution definition for the calling app on the current shop. Apps can use attribution definitions to label orders they route to a shop, replacing or augmenting any definitions shipped…

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the orderAttributionDefinitionUpsert action (under Order).
  3. Fill in the fields below, then reference the result from later steps as {{orderattributiondefinitionupsert.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 OrderAttributionDefinitionUpsert($input: OrderAttributionDefinitionUpsertInput!) {
  orderAttributionDefinitionUpsert(input: $input) {
    orderAttributionDefinition {
      displayName
      handle
      icon
      id
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

inputobjectrequired

The input fields for upserting the order attribution definition.

handlestringrequired
displayNamestringrequired
iconstring
json
{
  "input": {
    "handle": "string",
    "displayName": "string",
    "icon": "string"
  }
}

Response

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

orderAttributionDefinitionobject
displayNamestring
handlestring
iconstring
idstring
userErrorsarray<object>
codeobject
fieldobject
messageobject

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

orderAttributionDefinitionUpsert — Shopify — Documentation