Skip to content

GET_QUOTES

This event is fired when requesting quotes for a product. It will always trigger the CREATE_OR_UPDATE_CLIENT event using the provided client intake. If clientId is not provided, a new client will be created and its ID will be returned in the response.

When and what fires this event?

If this event is defined on a product, and it has actions that are enabled:

  • CoPilot: fires this event when a new quote is requested in the Account Builder;
  • Storefront: fires this event at the end of client intake;
  • Fired externally via API on-demand.

Request payload

POST: https://api.{ENV}.dais.com/ioi/v3/event/fire

curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/event/fire' \
--header 'Authorization: Basic <yourAuthHere>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "lineId": "<UUID of the product>",
  "type": "GET_QUOTES",
  "payload": {
      "intake": {
        "<qid>": {
            "type": "ANSWER",
            "answer": "<answer>",
            "qid": "<qid>"
          }
      },
      "asConfiguredAtTimestamp": "2022-05-24T19:04:24.1Z"
  }
}'
{
  "lineId": "262e67be-c08c-43c0-bb51-06fe4408b4e9",
  "type": "GET_QUOTES",
  "agencyCodes": ["<for some events, agency codes are required>"],
  "payload": {
      "clientId": "220c4020-7f20-4a16-ba51-d0945804dd83",
      "referrer": "String",
      "intake": {
        "numEmployees": {
          "type": "ANSWER",
          "answer": "55",
          "qid": "numEmployees"
        },
        "isNonProfit": {
          "type": "ANSWER",
          "answer": "YES",
          "qid": "isNonProfit"
        },
        "claimInLast12Mo": {
          "type": "ANSWER",
          "answer": "12",
          "qid": "claimInLast12Mo"
        }
      },
      "asConfiguredAtTimestamp": "2022-05-24T19:04:24.1Z"
  }
}

Request fields

PropertyRequiredDescription
lineIdtrueUUID for the product
typetrueMust be set to GET_QUOTES
agencyCodesfalseLook at xxx pointer to agency code data
payloadtrueExplained below

Payload fields

PropertyRequiredDescription
clientIdfalseUUID for client id. A new client will be created if clientId is omitted.
referrerfalseString value to track a client referral.
intakefalseMap of question identifiers (qid) to client answers.
asConfiguredAtTimestampfalseTimestamp of the rating configuration to use for this quote.

Response json

{
  "triggerRequestId": "fc55a520-5194-4b6f-b84d-3457f189c5cf",
  "executedActionCount": 1,
  "expectedResponseCount": 1,
  "metadata": { }
}

Response fields

PropertyRequiredDescription
triggerRequestIdtrueUUID that identifies the execution of the trigger.
executedActionCounttrueNumber of actions executed by this trigger.
expectedResponseCounttrueNumber of responses expected from the executed actions.
metadatafalseAdditional details produced by specific actions during the trigger execution.

Metadata fields

The metadata object is dynamic. In this example, it contains the result of the CREATE_OR_UPDATE_CLIENT action.

PropertyRequiredDescription
CREATE_OR_UPDATE_CLIENTfalseHolds data produced by the Create or Update Client action.