{
  "name": "Generate invoices from closed-won deals",
  "description": "When a deal hits Closed Won, create the invoice from its line items and terms, route for approval, and write the number back.",
  "generatedBy": "Spion",
  "generatedAt": "2026-06-14T14:13:03.649Z",
  "confidence": "strong",
  "efficiencyGain": {
    "manualSteps": 6,
    "automatedSteps": 4,
    "reductionPercent": 33,
    "timeSavedPerRun": "~10 min",
    "annualHoursSaved": null
  },
  "trigger": {
    "provider": "workato",
    "type": "event",
    "name": "Deal closed won",
    "description": "When a CRM deal moves to Closed Won"
  },
  "actions": [
    {
      "number": 1,
      "type": "action",
      "tool": "Invoicing tool",
      "name": "Create invoice",
      "description": "Create an invoice from the deal's line items, amount, and payment terms.",
      "replaces": [],
      "addedBySpion": false
    },
    {
      "number": 2,
      "type": "action",
      "tool": "Approval",
      "name": "Route for sign-off",
      "description": "Route the invoice to the owner for sign-off.",
      "replaces": [],
      "addedBySpion": false
    },
    {
      "number": 3,
      "type": "action",
      "tool": "Invoicing tool",
      "name": "Send invoice",
      "description": "On approval, send it to the billing contact.",
      "replaces": [],
      "addedBySpion": false
    },
    {
      "number": 4,
      "type": "action",
      "tool": "CRM",
      "name": "Write back",
      "description": "Write the invoice number and status back to the deal. On rejection, create a task for finance.",
      "why": "keeps the CRM the source of truth for billing status.",
      "replaces": [],
      "addedBySpion": true
    }
  ]
}