{
  "$schema": "https://pinlyx.com/resources/schema/automations.json",
  "version": 1,
  "description": "The three starter automations from Step 5. Add under Settings > Automations. These three cover most of the time saving; add more only after they have proved themselves.",
  "automations": [
    {
      "id": "calendar-on-qualified",
      "name": "Send the calendar link on entry to Qualified",
      "trigger": {
        "event": "deal.stage_changed",
        "toStage": "Qualified"
      },
      "actions": [
        {
          "type": "send_message",
          "template": "calendar-invite",
          "channel": "contact_primary"
        },
        {
          "type": "create_task",
          "title": "Confirm demo booked",
          "dueInDays": 2,
          "priority": "high"
        }
      ],
      "why": "The gap between qualifying and booking is where most deals cool off."
    },
    {
      "id": "nudge-stalled-demo",
      "name": "Internal nudge after 48h in Demo booked with no movement",
      "trigger": {
        "event": "deal.stage_age",
        "stage": "Demo booked",
        "hours": 48
      },
      "actions": [
        {
          "type": "notify_owner",
          "message": "Deal has been in Demo booked for 48 hours with no update."
        },
        {
          "type": "add_tag",
          "tag": "needs-attention"
        }
      ],
      "why": "Catches the demo that quietly never happened."
    },
    {
      "id": "onboarding-on-won",
      "name": "Kick off onboarding on Closed won",
      "trigger": {
        "event": "deal.won"
      },
      "actions": [
        {
          "type": "create_task",
          "title": "Onboarding kickoff",
          "assignTo": "customer_success",
          "dueInDays": 1,
          "priority": "high"
        },
        {
          "type": "send_message",
          "template": "welcome",
          "channel": "contact_primary"
        },
        {
          "type": "add_tag",
          "tag": "customer"
        }
      ],
      "why": "Income posts to the ledger automatically on Won; onboarding does not. This closes that gap."
    }
  ]
}
