younifyd
Menu

fulfillmentCreate

Creates a fulfillment for one or more FulfillmentOrder objects. The fulfillment orders are associated with the same Order and are assigned to the same Location.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the fulfillmentCreate action (under Fulfillment).
  3. Fill in the fields below, then reference the result from later steps as {{fulfillmentcreate.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 FulfillmentCreate($fulfillment: FulfillmentInput!, $message: String) {
  fulfillmentCreate(fulfillment: $fulfillment, message: $message) {
    fulfillment {
      createdAt
      deliveredAt
      displayStatus
      estimatedDeliveryAt
      id
      inTransitAt
      legacyResourceId
      location {
        activatable
        address
        addressVerified
        createdAt
        deactivatable
        deactivatedAt
        deletable
        fulfillmentService
        fulfillsOnlineOrders
        hasActiveInventory
        hasUnfulfilledOrders
        id
        isActive
        isFulfillmentService
        isPrimary
        legacyResourceId
        localPickupSettingsV2
        name
        shipsInventory
        suggestedAddresses
        updatedAt
      }
      name
      order {
        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
      }
      originAddress {
        address1
        address2
        city
        countryCode
        provinceCode
        zip
      }
      requiresShipping
      service {
        callbackUrl
        fulfillmentOrdersOptIn
        handle
        id
        inventoryManagement
        location
        requiresShippingMethod
        serviceName
        trackingSupport
        type
      }
      shippingLabel {
        cancellable
        id
        location
        printed
        shippingDocuments
        trackingInfo
      }
      status
      totalQuantity
      updatedAt
    }
    userErrors {
      field
      message
    }
  }
}

Variables

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

fulfillmentobjectrequired

The input fields used to create a fulfillment from fulfillment orders.

trackingInfoobject5 fields
notifyCustomerboolean
lineItemsByFulfillmentOrderarray<object>required2 fields
originAddressobject6 fields
messagestring

An optional message for the fulfillment request.

json
{
  "fulfillment": {
    "lineItemsByFulfillmentOrder": [
      {
        "fulfillmentOrderId": "string",
        "fulfillmentOrderLineItems": "string"
      }
    ],
    "trackingInfo": {
      "number": "string",
      "url": "string",
      "company": "string",
      "numbers": [
        "string"
      ],
      "urls": [
        "string"
      ]
    },
    "notifyCustomer": false,
    "originAddress": {
      "countryCode": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "zip": "string",
      "provinceCode": "string"
    }
  },
  "message": "string"
}

Response

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

fulfillmentobject
createdAtstring
deliveredAtstring
displayStatusstring

One ofATTEMPTED_DELIVERYCANCELEDCONFIRMEDDELAYEDDELIVEREDFAILUREFULFILLEDCARRIER_PICKED_UPIN_TRANSITLABEL_PRINTEDLABEL_PURCHASEDLABEL_VOIDEDMARKED_AS_FULFILLEDNOT_DELIVEREDOUT_FOR_DELIVERYREADY_FOR_PICKUPPICKED_UPSUBMITTED

estimatedDeliveryAtstring
idstring
inTransitAtstring
legacyResourceIdstring
locationobject21 fields
namestring
orderobject40 fields
originAddressobject6 fields
requiresShippingboolean
serviceobject10 fields
shippingLabelobject6 fields
statusstring

One ofPENDINGOPENSUCCESSCANCELLEDERRORFAILURE

totalQuantitynumber
updatedAtstring
userErrorsarray<object>
fieldobject
messageobject

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