{
  "schema_version": "1.0.0",
  "id": "quickbooks-payment-thank-you",
  "title": "Thank a client when a QuickBooks invoice is paid",
  "category": "finance",
  "difficulty": "beginner",
  "featured": false,
  "description": "When a payment is recorded in QuickBooks Online, email the client a short thank-you with the amount and invoice, and celebrate it in Slack.",
  "tags": [
    "quickbooks",
    "gmail",
    "slack",
    "accounts-receivable"
  ],
  "apps": [
    "QuickBooks Online",
    "Gmail",
    "Slack"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 2 steps after the trigger",
      "premium app: QuickBooks Online"
    ]
  },
  "tasks": {
    "typical": 2,
    "max": 2
  },
  "trigger": {
    "app": "QuickBooks Online",
    "event": "New Payment",
    "kind": "polling",
    "title": "Payment received",
    "why": "Fires for each payment recorded against an invoice.",
    "config": {
      "Company": "YOUR_QUICKBOOKS_COMPANY"
    },
    "outputs": [
      "payment_id",
      "customer_name",
      "customer_email",
      "total_amount",
      "currency",
      "txn_date",
      "invoice_numbers"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "thanks",
      "kind": "action",
      "app": "Gmail",
      "event": "Send Email",
      "title": "Email a thank-you",
      "why": "Short and specific: the amount and invoice, nothing else.",
      "fields": {
        "To": "{{trigger.customer_email}}",
        "Subject": "Payment received, thank you",
        "Body Type": "plain",
        "Body": "Hi {{trigger.customer_name}},\n\nWe received your payment of {{trigger.total_amount}} {{trigger.currency}} for invoice {{trigger.invoice_numbers}} on {{trigger.txn_date}}. Thank you.\n\nYOUR_NAME",
        "From Name": "YOUR_BUSINESS_NAME"
      },
      "outputs": [
        "id",
        "thread_id"
      ]
    },
    {
      "key": "win",
      "kind": "action",
      "app": "Slack",
      "event": "Send Channel Message",
      "title": "Post it to #wins",
      "why": "Cash in is good news worth sharing.",
      "fields": {
        "Channel": "#wins",
        "Message Text": ":moneybag: {{trigger.customer_name}} paid {{trigger.total_amount}} {{trigger.currency}} (invoice {{trigger.invoice_numbers}}).",
        "Send as a bot?": "Yes",
        "Bot Name": "Zap alerts",
        "Include a link to this Zap?": "No"
      },
      "outputs": [
        "ts",
        "permalink"
      ]
    }
  ]
}
