Cross-Provider Workflow

Shopify Customer Search to Twilio Win-Back SMS

Version 1.0.0

Search Shopify customers by query, then text a matched customer a win-back offer with Twilio.

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

Providers Orchestrated

shopify twilio

Workflows

search-customers-and-text-offer
Search Shopify customers, then SMS a matched customer a win-back offer.
Searches Shopify customers using a query, reads the phone of the first matched customer, and sends them a Twilio win-back SMS.
2 steps inputs: accountSid, fromPhone, query outputs: customerPhone, messageSid
1
search-customers
$sourceDescriptions.shopifyApi.searchCustomers
Search Shopify customers by query.
2
text-offer
$sourceDescriptions.twilioApi.createMessage
Send the matched customer a Twilio win-back SMS.

Source API Descriptions

Arazzo Workflow Specification

shop-customer-search-sms-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Customer Search to Twilio Win-Back SMS
  summary: Search Shopify customers by query, then text a matched customer a win-back offer with Twilio.
  description: >-
    A re-engagement workflow that searches Shopify customers by a query, takes
    the first match, and texts them a win-back offer through Twilio. Demonstrates
    using a commerce platform's customer search to drive a targeted messaging
    campaign through a communications provider.
  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: search-customers-and-text-offer
    summary: Search Shopify customers, then SMS a matched customer a win-back offer.
    description: >-
      Searches Shopify customers using a query, reads the phone of the first
      matched customer, and sends them a Twilio win-back SMS.
    inputs:
      type: object
      properties:
        query:
          type: string
        accountSid:
          type: string
        fromPhone:
          type: string
    steps:
      - stepId: search-customers
        description: Search Shopify customers by query.
        operationId: $sourceDescriptions.shopifyApi.searchCustomers
        parameters:
          - name: query
            in: query
            value: $inputs.query
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          customerPhone: $response.body#/customers/0/phone
          customerName: $response.body#/customers/0/first_name
      - stepId: text-offer
        description: Send the matched customer a Twilio win-back SMS.
        operationId: $sourceDescriptions.twilioApi.createMessage
        parameters:
          - name: AccountSid
            in: path
            value: $inputs.accountSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $steps.search-customers.outputs.customerPhone
            From: $inputs.fromPhone
            Body: We miss you! Here is a special offer just for you.
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageSid: $response.body#/sid
    outputs:
      customerPhone: $steps.search-customers.outputs.customerPhone
      messageSid: $steps.text-offer.outputs.messageSid