younifyd
Menu

subscriptionContractProductChange

Allows for the easy change of a Product in a Contract or a Product price change.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the subscriptionContractProductChange action (under Subscription).
  3. Fill in the fields below, then reference the result from later steps as {{subscriptioncontractproductchange.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 SubscriptionContractProductChange($actor: SubscriptionActor, $subscriptionContractId: ID!, $lineId: ID!, $input: SubscriptionContractProductChangeInput!) {
  subscriptionContractProductChange(
    actor: $actor
    subscriptionContractId: $subscriptionContractId
    lineId: $lineId
    input: $input
  ) {
    contract {
      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
      }
      appAdminUrl
      billingPolicy {
        anchors
        interval
        intervalCount
        maxCycles
        minCycles
      }
      createdAt
      currencyCode
      customAttributes {
        key
        value
      }
      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
      }
      deliveryMethod
      deliveryPolicy {
        anchors
        interval
        intervalCount
      }
      deliveryPrice {
        amount
        currencyCode
      }
      id
      lastBillingAttemptErrorType
      lastPaymentStatus
      lineCount
      linesCount {
        count
        precision
      }
      nextBillingDate
      note
      originOrder {
        additionalFees
        alerts
        app
        attribution
        billingAddress
        billingAddressMatchesShippingAddress
        canMarkAsPaid
        canNotifyCustomer
        cancelReason
        cancellation
        cancelledAt
        capturable
        cartDiscountAmount
        cartDiscountAmountSet
        cartToken
        channel
        channelInformation
        checkoutToken
        clientIp
        closed
        closedAt
        confirmationNumber
        confirmed
        createdAt
        currencyCode
        currentCartDiscountAmountSet
        currentShippingPriceSet
        currentSubtotalLineItemsQuantity
        currentSubtotalPriceSet
        currentTaxLines
        currentTotalAdditionalFeesSet
        currentTotalDiscountsSet
        currentTotalDutiesSet
        currentTotalPriceSet
        currentTotalTaxSet
        currentTotalWeight
        customAttributes
        customer
        customerAcceptsMarketing
        customerJourney
        customerJourneySummary
        customerLocale
        discountCode
        discountCodes
        displayAddress
        displayFinancialStatus
        displayFulfillmentStatus
        disputes
        dutiesIncluded
        edited
        email
        estimatedTaxes
        fulfillable
        fulfillmentsCount
        fullyPaid
        hasTimelineComment
        id
        landingPageDisplayText
        landingPageUrl
        legacyResourceId
        merchantBusinessEntity
        merchantEditable
        merchantEditableErrors
        merchantOfRecordApp
        name
        netPayment
        netPaymentSet
        note
        number
        originalTotalAdditionalFeesSet
        originalTotalDutiesSet
        originalTotalPriceSet
        paymentCollectionDetails
        paymentGatewayNames
        paymentTerms
        phone
        physicalLocation
        poNumber
        presentmentCurrencyCode
        processedAt
        productNetwork
        publication
        purchasingEntity
        referralCode
        referrerDisplayText
        referrerUrl
        refundDiscrepancySet
        refundable
        registeredSourceUrl
        requiresShipping
        restockable
        retailLocation
        returnStatus
        risk
        riskLevel
        shippingAddress
        shippingLine
        shopifyProtect
        sourceIdentifier
        sourceName
        staffMember
        subtotalLineItemsQuantity
        subtotalPrice
        subtotalPriceSet
        tags
        taxExempt
        taxLines
        taxesIncluded
        test
        totalCapturable
        totalCapturableSet
        totalCashRoundingAdjustment
        totalDiscounts
        totalDiscountsSet
        totalOutstandingSet
        totalPrice
        totalPriceSet
        totalReceived
        totalReceivedSet
        totalRefunded
        totalRefundedSet
        totalRefundedShippingSet
        totalShippingPrice
        totalShippingPriceSet
        totalTax
        totalTaxSet
        totalTipReceived
        totalTipReceivedSet
        totalWeight
        transactionsCount
        unpaid
        updatedAt
      }
      revisionId
      status
      updatedAt
    }
    lineUpdated {
      concatenatedOriginContract {
        app
        appAdminUrl
        billingPolicy
        createdAt
        currencyCode
        customAttributes
        customer
        deliveryMethod
        deliveryPolicy
        deliveryPrice
        id
        lastBillingAttemptErrorType
        lastPaymentStatus
        lineCount
        linesCount
        nextBillingDate
        note
        originOrder
        revisionId
        status
        updatedAt
      }
      currentPrice {
        amount
        currencyCode
      }
      customAttributes {
        key
        value
      }
      discountAllocations {
        amount
        discount
      }
      id
      lineDiscountedPrice {
        amount
        currencyCode
      }
      pricingPolicy {
        basePrice
        cycleDiscounts
      }
      productId
      quantity
      requiresShipping
      sellingPlanId
      sellingPlanName
      sku
      taxable
      title
      variantId
      variantImage {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      variantTitle
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

actorstring

The actor who initiated a subscription action.

One ofCUSTOMERMERCHANTPARTNER

subscriptionContractIdstringrequired

The ID of the subscription contract.

lineIdstringrequired

The gid of the Subscription Line to update.

inputobjectrequired

The properties of the Product changes.

productVariantIdstring
currentPricestring
json
{
  "subscriptionContractId": "string",
  "lineId": "string",
  "input": {
    "productVariantId": "string",
    "currentPrice": "string"
  },
  "actor": "CUSTOMER"
}

Response

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

contractobject
appobject35 fields
appAdminUrlstring
billingPolicyobject5 fields
createdAtstring
currencyCodestring

One ofUSDEURGBPCADAFNALLDZDAOAARSAMDAWGAUDBBDAZNBDTBSDBHDBIFBYNBZDBMDBTNBAMBRLBOBBWPBNDBGNMMKKHRCVEKYDXAFCLPCNYCOPKMFCDFCRCHRK

customAttributesarray<object>
customerobject38 fields
deliveryMethodobject4 fields

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

deliveryPolicyobject3 fields
deliveryPriceobject2 fields
idstring
lastBillingAttemptErrorTypestring

One ofPAYMENT_ERRORCUSTOMER_ERRORINVENTORY_ERROROTHER

lastPaymentStatusstring

One ofSUCCEEDEDFAILED

lineCountnumber
linesCountobject2 fields
nextBillingDatestring
notestring
originOrderobject40 fields
revisionIdstring
statusstring

One ofACTIVEPAUSEDCANCELLEDEXPIREDFAILED

updatedAtstring
lineUpdatedobject
concatenatedOriginContractobject21 fields
currentPriceobject2 fields
customAttributesarray<object>
discountAllocationsarray<object>
idstring
lineDiscountedPriceobject2 fields
pricingPolicyobject2 fields
productIdstring
quantitynumber
requiresShippingboolean
sellingPlanIdstring
sellingPlanNamestring
skustring
taxableboolean
titlestring
variantIdstring
variantImageobject7 fields
variantTitlestring
userErrorsarray<object>
codeobject
fieldobject
messageobject

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

subscriptionContractProductChange — Shopify — Documentation