{
  "workflow_name": "Log cancelled or refunded WooCommerce orders and alert finance in Slack",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Order Updated",
          "app": {
            "key": "woocommerce",
            "fm_app": "woocommerce"
          },
          "eventSlug": "update_order",
          "eventTitle": "Order Updated",
          "layoutDirection": "horizontal",
          "stepNumber": 1
        },
        "targetPosition": "bottom",
        "type": "trigger",
        "stepNumber": 1,
        "expanded": true,
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "application": "woocommerce",
        "stepID": "1",
        "action": "update_order",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "order_id": "10432",
          "order_number": "10432",
          "billing_first_name": "Priya",
          "billing_last_name": "Nair",
          "billing_email": "priya@example.com",
          "billing_phone": "+15557654321",
          "total": "149.00",
          "currency": "USD",
          "payment_method": "Credit Card",
          "status": "cancelled",
          "items_count": "3"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "order_id": "10432",
              "order_number": "10432",
              "billing_first_name": "Priya",
              "billing_last_name": "Nair",
              "billing_email": "priya@example.com",
              "billing_phone": "+15557654321",
              "total": "149.00",
              "currency": "USD",
              "payment_method": "Credit Card",
              "status": "cancelled",
              "items_count": "3"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Filter Conditions",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "filter",
            "fm_app": "filter"
          },
          "eventSlug": "continue_if",
          "eventTitle": "Continue If Condition Meet",
          "customLabel": "Only cancelled/refunded"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "filterConditions": {
            "1": [
              {
                "key": "{woocommerce1.status}",
                "condition": "contain_text",
                "value": "cancel"
              }
            ]
          }
        },
        "application": "filter",
        "action": "continue_if",
        "nodeType": "step",
        "stepID": "2",
        "filterConditions": {
          "filterConditions": {
            "1": [
              {
                "key": "{woocommerce1.status}",
                "condition": "contain_text",
                "value": "cancel"
              }
            ]
          }
        }
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Log cancellation",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "google_spreadsheets",
            "fm_app": "google_spreadsheets"
          },
          "eventSlug": "new_row",
          "eventTitle": "Add New Row"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": [],
        "application": "google_spreadsheets",
        "action": "new_row",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Notify team on Slack",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "slack",
            "fm_app": "slack"
          },
          "eventSlug": "send_message_to_channel",
          "eventTitle": "Send Channel Message"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "message_text": "⚠️ Order #{woocommerce1.order_number} is now {woocommerce1.status} — {woocommerce1.currency} {woocommerce1.total}"
        },
        "application": "slack",
        "action": "send_message_to_channel",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 700,
          "y": 0
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "main_end_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      }
    ],
    "edges": [
      {
        "id": "e-1-2",
        "source": "1",
        "target": "2",
        "type": "step",
        "data": []
      },
      {
        "id": "e-2-3",
        "source": "2",
        "target": "3",
        "type": "step",
        "data": []
      },
      {
        "id": "e-3-4",
        "source": "3",
        "target": "4",
        "type": "step",
        "data": []
      },
      {
        "id": "e-4-main_end_placeholder",
        "source": "4",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Log cancelled or refunded WooCommerce orders and alert finance in Slack",
    "folder": "all",
    "description": "When an order is updated to cancelled or refunded, log it to Google Sheets and alert your finance channel. A filter keeps only cancelled/refunded states.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}