The next thing to ask the customer
next_questionStep 1 of 3: call it until ready_to_quote is true, sending back the collected it returns each time and each answer under answer_as.key. Then start_quote.
Returns the one question to put to the customer now, in their language, with the options to offer when the field has a fixed set. Call it before each question and again after every answer, until ready_to_quote is true, then call start_quote.
Send only what the customer said this turn, in answered, together with the collected from the last call. The connector keeps the record of the conversation, so nothing is repeated and an answer given before its turn is not lost. When ready_to_quote turns true, summary is what the customer has said: read it back and let them correct it before quoting.
It exists so the order and the pace are the connector's rather than a matter of judgement: Sigo's customers are working people, often quoting on a phone, and a turn that asks for four things at once is where they give up.
Once a ZIP is given it is checked here, so a customer outside the states Sigo is licensed in is told before being walked through the rest.
There are two stretches. stage: "first_quote" is the one that ends in estimates. stage: "second_round" is for a customer who saw those estimates and wants to finish the application so the carrier can quote it for real: it asks where the car is kept, the VIN, who owns it, the licence, and a few more. The prices it leads to are still estimates; the final quote comes after the carrier's own questions, in Sigo's link. get_quote says when that is worth offering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stage | No | Which stretch the conversation is in. `second_round` is for a customer who saw prices and wants to finish the application; it asks a different set, and the prices it leads to are still estimates. | first_quote |
| locale | Yes | The language the customer is writing in. Set it from their own messages rather than leaving the default: the estimate's notice comes back in this language, and a notice the customer cannot read discloses nothing. Sigo serves these two languages only. | |
| answered | No | Only what the customer said this turn. Everything from earlier turns is already in `collected` and must not be repeated here. | |
| collected | No | The `collected` from the previous call. Leave it out on the first question of a conversation and send it on every call after that: it carries everything answered so far, so nothing has to be repeated and nothing is lost. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ask | Yes | The question, ready to put to the customer, in their language. | |
| field | Yes | The question being asked, by name. Not the key to answer under: that is `answer_as.key`. | |
| options | Yes | Every choice the customer may pick, when the field has a fixed set. | |
| summary | Yes | What the customer has answered, to read back to them for confirmation. Present only once `ready_to_quote` is true; null while there are still questions to ask. | |
| answer_as | Yes | How to send the answer back. Null on the closing step, when there is nothing left to answer. | |
| collected | Yes | Everything answered so far, this turn included. Send it back on the next call. It is the connector's record of the conversation, so nothing has to be asked twice. | |
| ready_to_quote | Yes | True when nothing is missing and start_quote can be called. |