Cross-Provider Workflow

Square Order to Slack Ops Notification

Version 1.0.0

Create a Square order with Block, then notify the ops team in Slack.

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

Providers Orchestrated

block slack

Workflows

square-order-ops-notify
Create a Square order, then post a Slack ops notification.
Creates an order with Block's Square Orders API and posts a fulfillment notification to a Slack channel.
2 steps inputs: channel, idempotencyKey, locationId outputs: orderId, orderState, slackPosted
1
create-order
$sourceDescriptions.blockApi.create-order
Create an order in Block's Square Orders API.
2
slack-notify
$sourceDescriptions.slackApi.postChatPostmessage
Post a fulfillment notification into a Slack ops channel.

Source API Descriptions

Arazzo Workflow Specification

pay-block-order-to-slack-ops-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Square Order to Slack Ops Notification
  summary: Create a Square order with Block, then notify the ops team in Slack.
  description: >-
    A cross-provider operations workflow that creates an order in Block's Square
    Orders API and then posts a fulfillment notification into a Slack channel so the
    operations team can begin picking and packing. Bridges commerce order intake and
    team coordination.
  version: 1.0.0
sourceDescriptions:
  - name: blockApi
    url: https://raw.githubusercontent.com/api-evangelist/block/refs/heads/main/openapi/block-square-api-openapi.yaml
    type: openapi
  - name: slackApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: square-order-ops-notify
    summary: Create a Square order, then post a Slack ops notification.
    description: >-
      Creates an order with Block's Square Orders API and posts a fulfillment
      notification to a Slack channel.
    inputs:
      type: object
      properties:
        locationId:
          type: string
        idempotencyKey:
          type: string
        channel:
          type: string
    steps:
      - stepId: create-order
        description: Create an order in Block's Square Orders API.
        operationId: $sourceDescriptions.blockApi.create-order
        requestBody:
          contentType: application/json
          payload:
            idempotency_key: $inputs.idempotencyKey
            order:
              location_id: $inputs.locationId
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          orderId: $response.body#/order/id
          orderState: $response.body#/order/state
      - stepId: slack-notify
        description: Post a fulfillment notification into a Slack ops channel.
        operationId: $sourceDescriptions.slackApi.postChatPostmessage
        requestBody:
          contentType: application/json
          payload:
            channel: $inputs.channel
            text: New Square order $steps.create-order.outputs.orderId ready for fulfillment.
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          messageTs: $response.body#/ts
          posted: $response.body#/ok
    outputs:
      orderId: $steps.create-order.outputs.orderId
      orderState: $steps.create-order.outputs.orderState
      slackPosted: $steps.slack-notify.outputs.posted