younifyd
Menu

publicationCreate

Creates a Publication that controls which Product and Collection customers can access through a Catalog.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the publicationCreate action (under Publication).
  3. Fill in the fields below, then reference the result from later steps as {{publicationcreate.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 PublicationCreate($input: PublicationCreateInput!) {
  publicationCreate(input: $input) {
    publication {
      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
      }
      autoPublish
      catalog {
        id
        operations
        priceList
        publication
        status
        title
      }
      id
      name
      operation
      supportsFuturePublishing
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

inputobjectrequired

The input fields to use when creating the publication.

catalogIdstring
defaultStatestring

One ofEMPTYALL_PRODUCTS

autoPublishboolean
json
{
  "input": {
    "catalogId": "string",
    "defaultState": "EMPTY",
    "autoPublish": false
  }
}

Response

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

publicationobject
appobject35 fields
autoPublishboolean
catalogobject6 fields
idstring
namestring
operationobject4 fields

This field can return one of several different object shapes — properties from every possible shape are shown together.

supportsFuturePublishingboolean
userErrorsarray<object>
codeobject
fieldobject
messageobject

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

Was this page helpful?