{
  "name": "Automate service order fulfillment with Claude, Freshworks CRM and SLA escalation",
  "nodes": [
    {
      "id": "2a7f8e52-851d-4bc2-8c17-cb23fd773425",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2608,
        720
      ],
      "parameters": {
        "width": 720,
        "height": 516,
        "content": "## Service Order Fulfillment & SLA Escalation Engine\nVersion 1.0.0 — Operations\n\nProduction-grade order fulfillment orchestrator for service brokerages (skip hire, field services, logistics). Verifies"
      }
    },
    {
      "id": "a4f5125c-2a1f-41c3-b622-c93d5f5fd041",
      "name": "Prerequisites",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1872,
        704
      ],
      "parameters": {
        "width": 440,
        "height": 516,
        "content": "## Prerequisites\n- Stripe account with secret key (for payment verification)\n- Freshworks CRM account — API key + domain (subdomain.freshsales.io)\n- Postmark account — Server API Token (transactional "
      }
    },
    {
      "id": "d945396c-a61a-4530-80d1-d3bc06016bbd",
      "name": "Setup Required",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        688
      ],
      "parameters": {
        "width": 440,
        "height": 532,
        "content": "## Setup Required\n1. Order Webhook — copy webhook URL into your website/checkout backend\n2. Verify Stripe Payment — add Stripe Secret Key to the HTTP Request header\n3. Extract Order Details — connect "
      }
    },
    {
      "id": "3aed4ffe-19c2-4ffa-a325-aa4dd0532656",
      "name": "How It Works",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3632,
        1136
      ],
      "parameters": {
        "width": 508,
        "height": 700,
        "content": "## How It Works\n1. Webhook receives new order from checkout with payment_intent_id and customer details\n2. Validate Code checks required fields and normalises data (email lowercase, postcode uppercase"
      }
    },
    {
      "id": "c2a28536-4292-4eb9-89a5-41ba6e86402a",
      "name": "New Order Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3328,
        1712
      ]
    },
    {
      "id": "ea16f534-d78a-4db5-aad0-37c461c5957a",
      "name": "Validate note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3040,
        1584
      ],
      "parameters": {
        "width": 270,
        "height": 112,
        "content": "Validates required fields, normalises email/postcode, assigns order reference"
      }
    },
    {
      "id": "8f534528-038e-4513-94a0-98179d1a8fbb",
      "name": "Validate & Parse Order",
      "type": "n8n-nodes-base.code",
      "position": [
        -3056,
        1712
      ]
    },
    {
      "id": "6d6ce05a-2315-4f6d-9aee-49fb3cc41f2f",
      "name": "Stripe note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2624,
        1536
      ],
      "parameters": {
        "width": 265,
        "height": 112,
        "content": "Verifies payment_intent status = succeeded via Stripe API before processing"
      }
    },
    {
      "id": "ee6503e4-b4cb-4173-82f6-0e02ee5adffd",
      "name": "Verify Stripe Payment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2800,
        1712
      ]
    },
    {
      "id": "67908e38-ad09-4553-b4f9-ca5d68bb46ff",
      "name": "Consolidate Payment Result",
      "type": "n8n-nodes-base.code",
      "position": [
        -2544,
        1696
      ]
    },
    {
      "id": "bc52303b-533b-489d-935e-8140796eced1",
      "name": "Payment check note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2304,
        1520
      ],
      "parameters": {
        "width": 270,
        "height": 112,
        "content": "Routes to failure path if payment not succeeded — stops order processing immediately"
      }
    },
    {
      "id": "43cad9a4-ef95-49f8-976e-9c47bcd93bce",
      "name": "Payment Succeeded?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2288,
        1696
      ]
    },
    {
      "id": "e0f96253-3430-428b-805c-dd2bb174f89f",
      "name": "Send Payment Failed Notice",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2288,
        2080
      ]
    },
    {
      "id": "57008ebb-925f-40de-a376-de4863d8fee5",
      "name": "Log Failed Payment",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1968,
        2064
      ]
    },
    {
      "id": "55ef6119-8bdc-42f3-910f-bb482f94d150",
      "name": "Extract note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        1520
      ],
      "parameters": {
        "width": 265,
        "height": 112,
        "content": "Claude AI parses free-text order notes into a validated structured schema"
      }
    },
    {
      "id": "d4e67627-ebda-4e94-9126-806fe8e8b562",
      "name": "Extract Order Details",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2048,
        1680
      ]
    },
    {
      "id": "48d70af6-9f7d-4b5a-9ff8-1f96e28099cc",
      "name": "Claude — Extract",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -2128,
        1856
      ]
    },
    {
      "id": "572c3262-7fca-45b1-ad16-d868ad6dd9d6",
      "name": "Order Details Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1824,
        1888
      ]
    },
    {
      "id": "726bd9eb-a04d-404a-bf1c-a059abc4868e",
      "name": "Upsert note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        1520
      ],
      "parameters": {
        "width": 270,
        "height": 112,
        "content": "Creates or updates customer contact in Freshworks CRM via upsert REST endpoint"
      }
    },
    {
      "id": "c7c99847-6227-49c5-947a-bfec9d4ca45a",
      "name": "Upsert Customer Contact",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1760,
        1680
      ]
    },
    {
      "id": "559828af-1583-41c4-a417-6353aea7b7c0",
      "name": "Consolidate Contact",
      "type": "n8n-nodes-base.code",
      "position": [
        -1504,
        1664
      ]
    },
    {
      "id": "612d16a1-5b05-44df-ac7c-ba3f0dde13dd",
      "name": "Deal note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        1504
      ],
      "parameters": {
        "width": 265,
        "height": 128,
        "content": "Creates service deal in Freshworks CRM linked to the customer contact"
      }
    },
    {
      "id": "b6faf3dd-af13-421f-8f40-7374a834bbaa",
      "name": "Create Service Deal",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        -1248,
        1664
      ]
    },
    {
      "id": "8f673c13-917c-452a-beae-9fa1f5d3c1d8",
      "name": "Consolidate Deal",
      "type": "n8n-nodes-base.code",
      "position": [
        -960,
        1648
      ]
    },
    {
      "id": "7544f7e7-12fb-4bcd-8f45-e193021c0658",
      "name": "Confirmation note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        1504
      ],
      "parameters": {
        "width": 260,
        "height": 112,
        "content": "Sends branded order confirmation email to customer via Postmark"
      }
    },
    {
      "id": "8c16eb41-7587-4571-beb9-3ba91be27f77",
      "name": "Send Order Confirmation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -720,
        1648
      ]
    },
    {
      "id": "e56a200d-1127-4e95-a7c0-30d7790f7ca5",
      "name": "Find Supplier note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        1504
      ],
      "parameters": {
        "width": 265,
        "height": 96,
        "content": "Queries Freshworks for contacts tagged 'supplier-available' — picks the first match"
      }
    },
    {
      "id": "5c4c1463-a95f-482c-a5e7-eaa48cbb9b9f",
      "name": "Find Available Supplier",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        -464,
        1632
      ]
    },
    {
      "id": "e0ce11bb-319c-4850-9329-c7b333c527b3",
      "name": "Consolidate Supplier",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        1616
      ]
    },
    {
      "id": "2784d278-49b4-4884-82d6-b6b673e86098",
      "name": "Supplier Request note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        1504
      ],
      "parameters": {
        "width": 265,
        "height": 60,
        "content": "Sends job assignment request to supplier with full order details and acceptance deadline"
      }
    },
    {
      "id": "7f72d3b7-457d-489c-b9cb-020516c3295a",
      "name": "Send Supplier Assignment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        64,
        1616
      ]
    },
    {
      "id": "90e7c7a1-76e9-4c1c-a231-94ebb16e4c7d",
      "name": "SLA Wait note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        1472
      ],
      "parameters": {
        "width": 260,
        "height": 60,
        "content": "Holds execution for 4 hours — the primary SLA window for supplier acceptance"
      }
    },
    {
      "id": "1e70b02a-4960-4a86-bfea-1306d3c0c345",
      "name": "SLA Wait — 4 Hours",
      "type": "n8n-nodes-base.wait",
      "position": [
        352,
        1600
      ]
    },
    {
      "id": "b749c37a-0eef-4eff-89b4-ce275adad397",
      "name": "Status check note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        1488
      ],
      "parameters": {
        "width": 260,
        "height": 60,
        "content": "Polls Freshworks deal stage to determine if supplier has accepted the job"
      }
    },
    {
      "id": "3f688afc-e92e-4b86-b9b5-0cb47edc194e",
      "name": "Check Deal Stage",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        640,
        1600
      ]
    },
    {
      "id": "649027d3-44bc-49df-91ee-a2b5c3b0f928",
      "name": "Consolidate SLA Status",
      "type": "n8n-nodes-base.code",
      "position": [
        912,
        1584
      ]
    },
    {
      "id": "bd4c7390-e339-454a-a54e-063cab044138",
      "name": "Accepted check note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        1424
      ],
      "parameters": {
        "width": 265,
        "height": 60,
        "content": "Routes TRUE if supplier accepted within SLA, FALSE triggers escalation path"
      }
    },
    {
      "id": "fd534425-fcc2-45f5-9ca0-f5e09c0566b6",
      "name": "Supplier Accepted SLA?",
      "type": "n8n-nodes-base.if",
      "position": [
        1104,
        1584
      ]
    },
    {
      "id": "e3628d89-588f-4842-8f7f-f10b70661bf4",
      "name": "Update Deal — Confirmed",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        1360,
        1488
      ]
    },
    {
      "id": "f2c7f4a5-0964-4425-a5f2-22199910e694",
      "name": "Send Customer — Job Confirmed",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1648,
        1472
      ]
    },
    {
      "id": "081edf20-bd4f-43bb-bcab-c14d5a59833f",
      "name": "Log Success",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1904,
        1456
      ]
    },
    {
      "id": "76d24a75-bcc1-4d92-90bd-70b9967c4ccd",
      "name": "Slack SLA note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        1776
      ],
      "parameters": {
        "width": 265,
        "height": 60,
        "content": "Fires Slack alert to ops team with full order context when SLA is missed"
      }
    },
    {
      "id": "afdd43a6-4150-403c-9c3d-0822f235a2a1",
      "name": "Alert Slack — SLA Missed",
      "type": "n8n-nodes-base.slack",
      "position": [
        1360,
        1904
      ]
    },
    {
      "id": "46726918-6b49-4abf-b9a7-e26e6764917d",
      "name": "Find Next Supplier",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        1648,
        1888
      ]
    },
    {
      "id": "e3d750e2-d21b-40a4-adc6-56feb974ae5a",
      "name": "Consolidate Next Supplier",
      "type": "n8n-nodes-base.code",
      "position": [
        1888,
        1872
      ]
    },
    {
      "id": "1b2ca8e6-048a-4436-b41c-ea291b6e574a",
      "name": "Reassign note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2064,
        1760
      ],
      "parameters": {
        "width": 265,
        "height": 60,
        "content": "Sends reassignment request to next available supplier with escalation context"
      }
    },
    {
      "id": "5c3f6f44-d8e6-4a1b-91b9-9e6d7b28d6de",
      "name": "Send Reassignment Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2144,
        1872
      ]
    },
    {
      "id": "cfc42bca-57f0-4133-972e-9146a7225765",
      "name": "Retry wait note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2592,
        1728
      ],
      "parameters": {
        "width": 255,
        "height": 60,
        "content": "Holds execution for 2 hours — the retry SLA window after reassignment"
      }
    },
    {
      "id": "02edae99-954e-42db-8bff-61cc5e7aa692",
      "name": "Retry Wait — 2 Hours",
      "type": "n8n-nodes-base.wait",
      "position": [
        2416,
        1856
      ]
    },
    {
      "id": "b650afd5-e923-4ab2-8903-3b7032d8d6e5",
      "name": "Check Retry Deal Stage",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        2672,
        1856
      ]
    },
    {
      "id": "65b4c331-9c0d-4ed1-88f0-5724024ef280",
      "name": "Consolidate Retry Status",
      "type": "n8n-nodes-base.code",
      "position": [
        2928,
        1840
      ]
    },
    {
      "id": "900c2353-523a-4fab-8722-c7feb9ab0a39",
      "name": "Retry accepted note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3312,
        1600
      ],
      "parameters": {
        "width": 265,
        "height": 60,
        "content": "Final decision: retry accepted triggers confirmation; failure triggers manual intervention alert"
      }
    },
    {
      "id": "82a95362-c7a9-44c1-903c-f95c138b25e5",
      "name": "Retry Accepted?",
      "type": "n8n-nodes-base.if",
      "position": [
        3184,
        1840
      ]
    },
    {
      "id": "0051e5f6-4683-4ace-8717-881fdb4092f2",
      "name": "Update Deal — Confirmed (Retry)",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        3440,
        1744
      ]
    },
    {
      "id": "09ab49dd-a34a-49be-8332-184c1b60f56b",
      "name": "Send Customer — Confirmed (Retry)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3712,
        1728
      ]
    },
    {
      "id": "12a17015-4bfc-4046-944f-15ae152e41cc",
      "name": "Log Success (Retry)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3984,
        1712
      ]
    },
    {
      "id": "0175903a-ffba-427e-834d-9c76a7b74019",
      "name": "Manual alert note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3456,
        1968
      ],
      "parameters": {
        "width": 265,
        "height": 60,
        "content": "Both SLA attempts failed — urgent Slack alert for immediate manual intervention"
      }
    },
    {
      "id": "d3b03def-5764-48ca-8c67-116f850cebad",
      "name": "Alert Slack — Manual Intervention",
      "type": "n8n-nodes-base.slack",
      "position": [
        3440,
        2112
      ]
    },
    {
      "id": "95b783b4-c8bc-4763-9756-4ffd65c7d3f1",
      "name": "Update Deal — Escalated",
      "type": "n8n-nodes-base.freshworksCrm",
      "position": [
        3728,
        2096
      ]
    },
    {
      "id": "1cfe2b69-bb31-44b6-bea3-e2ff798d196e",
      "name": "Log Escalated",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3968,
        2080
      ]
    }
  ],
  "connections": {
    "Retry Accepted?": {
      "main": [
        [
          {
            "node": "Update Deal — Confirmed (Retry)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert Slack — Manual Intervention",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Deal Stage": {
      "main": [
        [
          {
            "node": "Consolidate SLA Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate Deal": {
      "main": [
        [
          {
            "node": "Send Order Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Order Webhook": {
      "main": [
        [
          {
            "node": "Validate & Parse Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude — Extract": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Order Details",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Find Next Supplier": {
      "main": [
        [
          {
            "node": "Consolidate Next Supplier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Payment Succeeded?": {
      "main": [
        [
          {
            "node": "Extract Order Details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Payment Failed Notice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate Contact": {
      "main": [
        [
          {
            "node": "Create Service Deal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Service Deal": {
      "main": [
        [
          {
            "node": "Consolidate Deal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate Supplier": {
      "main": [
        [
          {
            "node": "Send Supplier Assignment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order Details Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Extract Order Details",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "SLA Wait — 4 Hours": {
      "main": [
        [
          {
            "node": "Check Deal Stage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Order Details": {
      "main": [
        [
          {
            "node": "Upsert Customer Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Stripe Payment": {
      "main": [
        [
          {
            "node": "Consolidate Payment Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Retry Deal Stage": {
      "main": [
        [
          {
            "node": "Consolidate Retry Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate SLA Status": {
      "main": [
        [
          {
            "node": "Supplier Accepted SLA?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry Wait — 2 Hours": {
      "main": [
        [
          {
            "node": "Check Retry Deal Stage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supplier Accepted SLA?": {
      "main": [
        [
          {
            "node": "Update Deal — Confirmed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert Slack — SLA Missed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Parse Order": {
      "main": [
        [
          {
            "node": "Verify Stripe Payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Available Supplier": {
      "main": [
        [
          {
            "node": "Consolidate Supplier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Order Confirmation": {
      "main": [
        [
          {
            "node": "Find Available Supplier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert Customer Contact": {
      "main": [
        [
          {
            "node": "Consolidate Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate Retry Status": {
      "main": [
        [
          {
            "node": "Retry Accepted?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Supplier Assignment": {
      "main": [
        [
          {
            "node": "SLA Wait — 4 Hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate Next Supplier": {
      "main": [
        [
          {
            "node": "Send Reassignment Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reassignment Request": {
      "main": [
        [
          {
            "node": "Retry Wait — 2 Hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Deal — Confirmed": {
      "main": [
        [
          {
            "node": "Send Customer — Job Confirmed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Deal — Escalated": {
      "main": [
        [
          {
            "node": "Log Escalated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert Slack — SLA Missed": {
      "main": [
        [
          {
            "node": "Find Next Supplier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate Payment Result": {
      "main": [
        [
          {
            "node": "Payment Succeeded?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Payment Failed Notice": {
      "main": [
        [
          {
            "node": "Log Failed Payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Customer — Job Confirmed": {
      "main": [
        [
          {
            "node": "Log Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Deal — Confirmed (Retry)": {
      "main": [
        [
          {
            "node": "Send Customer — Confirmed (Retry)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert Slack — Manual Intervention": {
      "main": [
        [
          {
            "node": "Update Deal — Escalated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Customer — Confirmed (Retry)": {
      "main": [
        [
          {
            "node": "Log Success (Retry)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}