Cross-Provider Workflow

Shopify Order Fulfillment to Twilio Shipping SMS

Version 1.0.0

Look up a Shopify order, fulfill it, then text the customer a shipping notification with Twilio.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

shopify twilio

Workflows

fulfill-order-and-text-customer
Fetch a Shopify order, fulfill it, and SMS the customer a shipping alert.
Retrieves a Shopify order by id, creates a fulfillment for its line items, then sends the customer a Twilio SMS letting them know their order has shipped.
3 steps inputs: accountSid, fromPhone, locationId, orderId, toPhone outputs: fulfillmentId, messageSid
1
get-order
$sourceDescriptions.shopifyApi.getOrder
Retrieve the Shopify order to fulfill.
2
create-fulfillment
$sourceDescriptions.shopifyApi.createFulfillment
Create a fulfillment for the order to mark it as shipped.
3
text-shipping-alert
$sourceDescriptions.twilioApi.createMessage
Send the customer a Twilio SMS that their order has shipped.

Source API Descriptions

Arazzo Workflow Specification

shop-order-shipping-sms-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Order Fulfillment to Twilio Shipping SMS
  summary: Look up a Shopify order, fulfill it, then text the customer a shipping notification with Twilio.
  description: >-
    A fulfillment workflow that retrieves a Shopify order, creates a fulfillment
    for it to mark the items as shipped, and notifies the customer with a Twilio
    SMS containing the order details. Demonstrates pairing a commerce platform's
    fulfillment operations with a messaging provider for real-time shipping
    updates.
  version: 1.0.0
sourceDescriptions:
  - name: shopifyApi
    url: https://raw.githubusercontent.com/api-evangelist/shopify/refs/heads/main/openapi/shopify-admin-rest-api-openapi.yml
    type: openapi
  - name: twilioApi
    url: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-messaging-openapi.yml
    type: openapi
workflows:
  - workflowId: fulfill-order-and-text-customer
    summary: Fetch a Shopify order, fulfill it, and SMS the customer a shipping alert.
    description: >-
      Retrieves a Shopify order by id, creates a fulfillment for its line items,
      then sends the customer a Twilio SMS letting them know their order has
      shipped.
    inputs:
      type: object
      properties:
        orderId:
          type: string
        locationId:
          type: integer
        accountSid:
          type: string
        toPhone:
          type: string
        fromPhone:
          type: string
    steps:
      - stepId: get-order
        description: Retrieve the Shopify order to fulfill.
        operationId: $sourceDescriptions.shopifyApi.getOrder
        parameters:
          - name: order_id
            in: path
            value: $inputs.orderId
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          orderName: $response.body#/order/name
      - stepId: create-fulfillment
        description: Create a fulfillment for the order to mark it as shipped.
        operationId: $sourceDescriptions.shopifyApi.createFulfillment
        requestBody:
          contentType: application/json
          payload:
            fulfillment:
              notify_customer: true
              location_id: $inputs.locationId
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          fulfillmentId: $response.body#/fulfillment/id
          fulfillmentStatus: $response.body#/fulfillment/status
      - stepId: text-shipping-alert
        description: Send the customer a Twilio SMS that their order has shipped.
        operationId: $sourceDescriptions.twilioApi.createMessage
        parameters:
          - name: AccountSid
            in: path
            value: $inputs.accountSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $inputs.toPhone
            From: $inputs.fromPhone
            Body: Good news! Your order has shipped.
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageSid: $response.body#/sid
    outputs:
      fulfillmentId: $steps.create-fulfillment.outputs.fulfillmentId
      messageSid: $steps.text-shipping-alert.outputs.messageSid