younifyd
Menu

collectionConditionsSourceCreate

Creates a shareable collection source that can later be linked to one or more collections.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the collectionConditionsSourceCreate action (under Collection).
  3. Fill in the fields below, then reference the result from later steps as {{collectionconditionssourcecreate.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 CollectionConditionsSourceCreate($input: CollectionCreateConditionsSourceInput!) {
  collectionConditionsSourceCreate(input: $input) {
    source {
      app {
        apiKey
        appStoreAppUrl
        appStoreDeveloperUrl
        availableAccessScopes
        banner
        description
        developerName
        developerType
        developerUrl
        embedded
        failedRequirements
        features
        feedback
        handle
        icon
        id
        installUrl
        installation
        isPostPurchaseAppInUse
        launchUrl
        navigationItems
        optionalAccessScopes
        previouslyInstalled
        pricingDetails
        pricingDetailsSummary
        privacyPolicyUrl
        publicCategory
        published
        requestedAccessScopes
        screenshots
        shopifyDeveloped
        title
        uninstallMessage
        uninstallUrl
        webhookApiVersion
      }
      description
      exclusion {
        conditions
        matchType
      }
      id
      inclusion {
        conditions
        matchType
      }
      shareable
      targetType
      title
    }
    userErrors {
      field
      message
    }
  }
}

Variables

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

inputobjectrequired

The input fields for the source to create.

titlestringrequired
descriptionstring
inclusionobject3 fields
exclusionobject3 fields
targetTypestring

One ofPRODUCTSVARIANTS

json
{
  "input": {
    "title": "string",
    "description": "string",
    "inclusion": {
      "matchType": "ANY",
      "conditions": [
        "string"
      ],
      "selections": [
        "string"
      ]
    },
    "exclusion": {
      "matchType": "ANY",
      "conditions": [
        "string"
      ],
      "selections": [
        "string"
      ]
    },
    "targetType": "PRODUCTS"
  }
}

Response

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

sourceobject
appobject35 fields
descriptionstring
exclusionobject2 fields
idstring
inclusionobject2 fields
shareableboolean
targetTypestring

One ofPRODUCTSVARIANTS

titlestring
userErrorsarray<object>
fieldobject
messageobject

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