Cross-Provider Workflow

Shopify Product Creation to Square Catalog Sync

Version 1.0.0

Create a product in Shopify, then mirror it into the Square (Block) catalog.

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

Providers Orchestrated

shopify block

Workflows

create-product-and-sync-catalog
Create a Shopify product and list the Square catalog to reconcile it.
Creates a product in Shopify, then lists the Square (Block) catalog so the new product can be reconciled and mirrored into the point-of-sale catalog.
2 steps inputs: bodyHtml, catalogTypes, title, vendor outputs: productId, productTitle
1
create-product
$sourceDescriptions.shopifyApi.createProduct
Create the product in Shopify.
2
list-square-catalog
$sourceDescriptions.blockApi.list-catalog
List the Square catalog to reconcile the new product.

Source API Descriptions

Arazzo Workflow Specification

shop-product-catalog-sync-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Product Creation to Square Catalog Sync
  summary: Create a product in Shopify, then mirror it into the Square (Block) catalog.
  description: >-
    A catalog-sync workflow that creates a product in Shopify and then reads the
    Square (Block) catalog to confirm where the new item should be mirrored for
    in-person point-of-sale. Demonstrates keeping an online storefront catalog
    and a Square commerce catalog aligned across two providers.
  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: blockApi
    url: https://raw.githubusercontent.com/api-evangelist/block/refs/heads/main/openapi/block-square-api-openapi.yaml
    type: openapi
workflows:
  - workflowId: create-product-and-sync-catalog
    summary: Create a Shopify product and list the Square catalog to reconcile it.
    description: >-
      Creates a product in Shopify, then lists the Square (Block) catalog so the
      new product can be reconciled and mirrored into the point-of-sale catalog.
    inputs:
      type: object
      properties:
        title:
          type: string
        bodyHtml:
          type: string
        vendor:
          type: string
        catalogTypes:
          type: string
    steps:
      - stepId: create-product
        description: Create the product in Shopify.
        operationId: $sourceDescriptions.shopifyApi.createProduct
        requestBody:
          contentType: application/json
          payload:
            product:
              title: $inputs.title
              body_html: $inputs.bodyHtml
              vendor: $inputs.vendor
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          productId: $response.body#/product/id
          productTitle: $response.body#/product/title
      - stepId: list-square-catalog
        description: List the Square catalog to reconcile the new product.
        operationId: $sourceDescriptions.blockApi.list-catalog
        parameters:
          - name: types
            in: query
            value: $inputs.catalogTypes
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          cursor: $response.body#/cursor
    outputs:
      productId: $steps.create-product.outputs.productId
      productTitle: $steps.create-product.outputs.productTitle