younifyd
Menu

orderEditBegin

Start an order edit session — returns a `calculatedOrder` you then modify with the other `orderEdit*` mutations before `orderEditCommit`.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the orderEditBegin action (under Order).
  3. Fill in the fields below, then reference the result from later steps as {{ordereditbegin.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 OrderEditBegin($id: ID!) {
  orderEditBegin(id: $id) {
    calculatedOrder {
      cartDiscountAmountSet {
        presentmentMoney
        shopMoney
      }
      committed
      id
      notificationPreviewHtml
      notificationPreviewTitle
      originalOrder {
        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
      }
      shippingLines {
        id
        price
        stagedStatus
        title
      }
      subtotalLineItemsQuantity
      subtotalPriceSet {
        presentmentMoney
        shopMoney
      }
      taxLines {
        channelLiable
        price
        priceSet
        rate
        ratePercentage
        source
        title
      }
      totalOutstandingSet {
        presentmentMoney
        shopMoney
      }
      totalPriceSet {
        presentmentMoney
        shopMoney
      }
    }
    orderEditSession {
      id
    }
    userErrors {
      field
      message
    }
  }
}

Variables

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

idstringrequired

The ID of the order to begin editing.

json
{
  "id": "string"
}

Response

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

calculatedOrderobject
cartDiscountAmountSetobject2 fields
committedboolean
idstring
notificationPreviewHtmlstring
notificationPreviewTitlestring
originalOrderobject40 fields
shippingLinesarray<object>
subtotalLineItemsQuantitynumber
subtotalPriceSetobject2 fields
taxLinesarray<object>
totalOutstandingSetobject2 fields
totalPriceSetobject2 fields
orderEditSessionobject
idstring
userErrorsarray<object>
fieldobject
messageobject

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