Quotient Webhooks

What are Webhooks?

Quotient Webhooks allow you to receive a payload of data in JSON format whenever certain events happen in a particular Quotient Account. For example, when a Quote is accepted in Quotient an invoice could be automatically created in your custom-made job system. This could also include things like the selected items, pricing and full contact details.

If you’re not a developer you might like to try Zapier instead.

Supported Events

Customer Asked Question
Triggers when a Customer asks a New Question.

Customer Viewed Quote
Triggers on the initial view. Subsequent triggers occur only if the previous view occurred more than 6 hours ago.

Quote Accepted
Triggers when a Quote is Accepted.

Quote Sent
Triggers when a New Quote is first Sent.

Quote Declined
Triggers when a Quote is Declined.

Setup Webhooks

  1. Go to Account Settings → Connected Apps → Webhooks (administrators only).
  2. Add your Webhook URL and hit ‘Save’.
    TIP: you can use requestbin.com to test events – it displays the payloads it receives simply on-screen.
  3. Hit ‘Test With Sample Data’ to trigger your desired Event.
  4. Once you're satisfied that your Webhook is receiving data, you can hit ‘Turn On’ for your desired Event.

Event Log

You can see a log of events triggered in Quotient – found in Account Settings → Connected Apps → Webhooks.

You can replay past events by hitting ‘Replay Event’. Note: It can take a few minutes for replayed events to display in the log (to check, you can hit Refresh Log).

Events in the log will be kept for up to 7 days.

Errors and Retries

If your Webhook URL is unreachable, Quotient will try again in 5, 10 and 15 minutes consecutively. If an event fails after the 3rd attempt, all Webhooks will be ‘Paused’ and you’ll be notified on your Quotient Dashboard to fix.

Field Types of Interest

You’ll see a full list in the Example Payloads (below).

Field Name Notes on values
event_name The name of the event triggered, with possible values:
"quote_accepted"
"quote_declined"
"quote_sent"
"customer_viewed"
"customer_question"
first_sent This is the Quote Date
amounts_are Indicates if Price Item amounts include tax or not.
Possible values are:
"Tax Exclusive (Inclusive Total)"
"Tax Exclusive"
"Tax Inclusive"
"No Tax"
item_headings A single text field containing all Price Items, with each heading on its own line, eg:
Widget Title
A Second Widget Title
Final Widget Title
You could use this to display a simple list as text in an email, for example.
selected_items Contains an array of all selected Price Items
selected_items → subscription The subscription value contains 3 comma separated components, eg:
Month, 3, 12
Meaning: "per 3 months, for a 12 month term"

An example, with no term:
Month, 1
Meaning: "per month" (no term specified)
quote_for → phone Only the first phone is included, from the ‘Person’ contact
quote_for → address Only the first address is included, from the ‘Person’ contact

Example Payloads

Quote Accepted

{
    "event_name": "quote_accepted",
    "quote_number": 1249,
    "title": "Home Security System and Monitoring",
    "quote_url": "https:\/\/www.quotientapp.com\/examples\/home-security-quote-template",
    "from": "Nathan Carter",
    "for": "Fearless Studios",
    "first_sent": "2017-07-27T00:04:44+00:00",
    "valid_until": "2017-10-24T23:04:00+00:00",
    "quote_status": "Accepted",
    "progress": "Active",
    "is_archived": false,
    "currency": "USD",
    "amounts_are": "Tax Exclusive (Inclusive Total)",
    "overall_discount": 0,
    "quote_for": {
        "name_first": "Scarlett",
        "name_last": "Richards",
        "email": "scarlett.richards@gmail.com",
        "company_name": "Fearless Studios",
        "phone": {
            "type": "Primary Phone",
            "value": "212.123.4567"
        },
        "address": {
            "type": "Postal Address",
            "street": "518 W 181st Street,",
            "city": "New York",
            "state": "NY",
            "zip": "10033",
            "country": "United States"
        }
    },
    "item_headings": "State-of-the-Art Alarm System\n24\/7 Remote Monitoring",
    "total_includes_tax": 1347.5,
    "total_excludes_tax": 1225,
    "discount_amount_includes_tax": 0,
    "discount_amount_excludes_tax": 0,
    "selected_items": [
        {
            "item_code": "ABC-001",
            "heading": "State-of-the-Art Alarm System",
            "description": "Keep you and your family safe and secure. With access control via WiFi you can manage your preferences, arm and disarm remotely.\r\n\r\n* Modern digital base unit with keypad, conveniently located in front entrance and garage\r\n* Pet friendly, motion sensors for six rooms.\r\n* 3 sleek style keyring remotes",
            "sales_category": "Sales",
            "tax_rate": 10,
            "tax_description": "10% tax",
            "subscription": "",
            "discount": 0,
            "cost_price": 0,
            "unit_price": 1200,
            "quantity": 0,
            "item_total": 1200
        },
        {
            "item_code": "ABC-002",
            "heading": "24\/7 Remote Monitoring",
            "description": "Monitoring your home alarm means you can have peace of mind when you\u2019re not at home, or when you are at home if the \u201cpanic alarm\u201d feature is set off.\r\n\r\nTop-notch service guaranteed. No lock-in period, no contracts. One payment per month.",
            "sales_category": "Sales",
            "tax_rate": 10,
            "tax_description": "10% tax",
            "subscription": "Month, 1",
            "discount": 0,
            "cost_price": 0,
            "unit_price": 25,
            "quantity": 0,
            "item_total": 25
        }
    ],
    "accepted": {
        "accepted_on_behalf": false,
        "accepted_on_behalf_who": "",
        "order_number": "ABC-123",
        "comments": "Great! Please proceed.",
        "when": "2017-08-16T22:02:40+00:00",
        "by": {
            "name_first": "Scarlett",
            "name_last": "Richards",
            "email": "scarlett.richards@gmail.com",
            "company_name": "Fearless Studios",
            "phone": {
                "type": "Primary Phone",
                "value": "212.123.4567"
            },
            "address": {
                "type": "Postal Address",
                "street": "518 W 181st Street,",
                "city": "New York",
                "state": "NY",
                "zip": "10033",
                "country": "United States"
            }
        }
    }
}

Quote Sent

{
    "event_name": "quote_sent",
    "quote_number": 1248,
    "title": "Home Security System and Monitoring",
    "quote_url": "https:\/\/www.quotientapp.com\/examples\/home-security-quote-template",
    "from": "Nathan Carter",
    "for": "Fearless Studios",
    "first_sent": "2017-07-27T00:02:55+00:00",
    "valid_until": "2017-10-24T23:00:00+00:00",
    "quote_status": "Awaiting Acceptance",
    "progress": "Active",
    "is_archived": false,
    "currency": "USD",
    "amounts_are": "Tax Exclusive (Inclusive Total)",
    "overall_discount": 0,
    "quote_for": {
        "name_first": "Scarlett",
        "name_last": "Richards",
        "email": "scarlett.richards@gmail.com",
        "company_name": "Fearless Studios",
        "phone": {
            "type": "Primary Phone",
            "value": "212.123.4567"
        },
        "address": {
            "type": "Postal Address",
            "street": "518 W 181st Street,",
            "city": "New York",
            "state": "NY",
            "zip": "10033",
            "country": "United States"
        }
    },
    "item_headings": "State-of-the-Art Alarm System\n24\/7 Remote Monitoring",
    "total_includes_tax": 1347.5,
    "total_excludes_tax": 1225,
    "discount_amount_includes_tax": 0,
    "discount_amount_excludes_tax": 0,
    "selected_items": [
        {
            "item_code": "ABC-001",
            "heading": "State-of-the-Art Alarm System",
            "description": "Keep you and your family safe and secure. With access control via WiFi you can manage your preferences, arm and disarm remotely.\r\n\r\n* Modern digital base unit with keypad, conveniently located in front entrance and garage\r\n* Pet friendly, motion sensors for six rooms.\r\n* 3 sleek style keyring remotes",
            "sales_category": "Sales",
            "tax_rate": 10,
            "tax_description": "10% tax",
            "subscription": "",
            "discount": 0,
            "cost_price": 0,
            "unit_price": 1200,
            "quantity": 0,
            "item_total": 1200
        },
        {
            "item_code": "ABC-002",
            "heading": "24\/7 Remote Monitoring",
            "description": "Monitoring your home alarm means you can have peace of mind when you\u2019re not at home, or when you are at home if the \u201cpanic alarm\u201d feature is set off.\r\n\r\nTop-notch service guaranteed. No lock-in period, no contracts. One payment per month.",
            "sales_category": "Sales",
            "tax_rate": 10,
            "tax_description": "10% tax",
            "subscription": "Month, 1",
            "discount": 0,
            "cost_price": 0,
            "unit_price": 25,
            "quantity": 0,
            "item_total": 25
        }
    ]
}

Quote Declined

{
    "event_name": "quote_declined",
    "quote_number": 1250,
    "title": "Home Security System and Monitoring",
    "quote_url": "https:\/\/www.quotientapp.com\/examples\/home-security-quote-template",
    "from": "Nathan Carter",
    "for": "Fearless Studios",
    "first_sent": "2017-07-27T00:10:06+00:00",
    "valid_until": "2017-10-24T23:09:00+00:00",
    "quote_status": "Declined",
    "progress": "Active",
    "is_archived": false,
    "currency": "USD",
    "amounts_are": "Tax Exclusive (Inclusive Total)",
    "overall_discount": 0,
    "quote_for": {
        "name_first": "Scarlett",
        "name_last": "Richards",
        "email": "scarlett.richards@gmail.com",
        "company_name": "Fearless Studios",
        "phone": {
            "type": "Primary Phone",
            "value": "212.123.4567"
        },
        "address": {
            "type": "Postal Address",
            "street": "518 W 181st Street,",
            "city": "New York",
            "state": "NY",
            "zip": "10033",
            "country": "United States"
        }
    },
    "item_headings": "State-of-the-Art Alarm System\n24\/7 Remote Monitoring",
    "total_includes_tax": 1347.5,
    "total_excludes_tax": 1225,
    "discount_amount_includes_tax": 0,
    "discount_amount_excludes_tax": 0,
    "selected_items": [
        {
            "item_code": "ABC-001",
            "heading": "State-of-the-Art Alarm System",
            "description": "Keep you and your family safe and secure. With access control via WiFi you can manage your preferences, arm and disarm remotely.\r\n\r\n* Modern digital base unit with keypad, conveniently located in front entrance and garage\r\n* Pet friendly, motion sensors for six rooms.\r\n* 3 sleek style keyring remotes",
            "sales_category": "Sales",
            "tax_rate": 10,
            "tax_description": "10% tax",
            "subscription": "",
            "discount": 0,
            "cost_price": 0,
            "unit_price": 1200,
            "quantity": 0,
            "item_total": 1200
        },
        {
            "item_code": "ABC-002",
            "heading": "24\/7 Remote Monitoring",
            "description": "Monitoring your home alarm means you can have peace of mind when you\u2019re not at home, or when you are at home if the \u201cpanic alarm\u201d feature is set off.\r\n\r\nTop-notch service guaranteed. No lock-in period, no contracts. One payment per month.",
            "sales_category": "Sales",
            "tax_rate": 10,
            "tax_description": "10% tax",
            "subscription": "Month, 1",
            "discount": 0,
            "cost_price": 0,
            "unit_price": 25,
            "quantity": 0,
            "item_total": 25
        }
    ],
    "declined": {
        "marked_as_declined": false,
        "comments": "Too expensive.",
        "when": "2017-08-16T22:01:49+00:00",
        "by": {
            "name_first": "Scarlett",
            "name_last": "Richards",
            "email": "scarlett.richards@gmail.com",
            "company_name": "Fearless Studios",
            "phone": {
                "type": "Primary Phone",
                "value": "212.123.4567"
            },
            "address": {
                "type": "Postal Address",
                "street": "518 W 181st Street,",
                "city": "New York",
                "state": "NY",
                "zip": "10033",
                "country": "United States"
            }
        }
    }
}

Customer Viewed Quote

{
    "event_name": "customer_viewed",
    "quote_number": 1248,
    "title": "Home Security System and Monitoring",
    "quote_url": "https:\/\/www.quotientapp.com\/examples\/home-security-quote-template",
    "from": "Nathan Carter",
    "for": "Fearless Studios",
    "first_sent": "2017-07-27T00:02:55+00:00",
    "valid_until": "2017-10-24T23:00:00+00:00",
    "quote_status": "Awaiting Acceptance",
    "progress": "Active",
    "is_archived": false,
    "currency": "USD",
    "amounts_are": "Tax Exclusive (Inclusive Total)",
    "overall_discount": 0,
    "quote_for": {
        "name_first": "Scarlett",
        "name_last": "Richards",
        "email": "scarlett.richards@gmail.com",
        "company_name": "Fearless Studios",
        "phone": {
            "type": "Primary Phone",
            "value": "212.123.4567"
        },
        "address": {
            "type": "Postal Address",
            "street": "518 W 181st Street,",
            "city": "New York",
            "state": "NY",
            "zip": "10033",
            "country": "United States"
        }
    },
    "viewed": {
        "when": "2017-08-29T08:40:04+00:00",
        "total_views": "3",
        "by": {
            "name_first": "Scarlett",
            "name_last": "Richards",
            "email": "scarlett.richards@gmail.com",
            "company_name": "Fearless Studios",
            "phone": {
                "type": "Primary Phone",
                "value": "212.123.4567"
            },
            "address": {
                "type": "Postal Address",
                "street": "518 W 181st Street,",
                "city": "New York",
                "state": "NY",
                "zip": "10033",
                "country": "United States"
            }
        }
    }
}

Customer Asked Question

{
    "event_name": "customer_question",
    "quote_number": 1248,
    "title": "Home Security System and Monitoring",
    "quote_url": "https:\/\/www.quotientapp.com\/examples\/home-security-quote-template",
    "from": "Nathan Carter",
    "for": "Fearless Studios",
    "first_sent": "2017-07-27T00:02:55+00:00",
    "valid_until": "2017-10-24T23:00:00+00:00",
    "quote_status": "Awaiting Acceptance",
    "progress": "Active",
    "is_archived": false,
    "currency": "USD",
    "amounts_are": "Tax Exclusive (Inclusive Total)",
    "overall_discount": 0,
    "quote_for": {
        "name_first": "Scarlett",
        "name_last": "Richards",
        "email": "scarlett.richards@gmail.com",
        "company_name": "Fearless Studios",
        "phone": {
            "type": "Primary Phone",
            "value": "212.123.4567"
        },
        "address": {
            "type": "Postal Address",
            "street": "518 W 181st Street,",
            "city": "New York",
            "state": "NY",
            "zip": "10033",
            "country": "United States"
        }
    },
    "question": {
        "when": "2017-07-27T00:03:40+00:00",
        "text": "Hi Jamie, this looks fantastic thank you. I\u2019d never considered video surveillance but would love the extra piece-of-mind when we\u2019re away. Speaking of which, we\u2019re having a family holiday next week, and it would be super convenient to get the system installed then. Is that possible?",
        "by": {
            "name_first": "Scarlett",
            "name_last": "Richards",
            "email": "scarlett.richards@gmail.com",
            "company_name": "Fearless Studios",
            "phone": {
                "type": "Primary Phone",
                "value": "212.123.4567"
            },
            "address": {
                "type": "Postal Address",
                "street": "518 W 181st Street,",
                "city": "New York",
                "state": "NY",
                "zip": "10033",
                "country": "United States"
            }
        }
    }
}