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"
  }
}

Event 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 payload

{
  "triggerRequestId": "fc55a520-5194-4b6f-b84d-3457f189c5cf",
  "executedActionCount": 1,
  "expectedResponseCount": 1,
  "metadata": {
    "CREATE_OR_UPDATE_CLIENT": {
      "clientId": "c07a0db0-0667-46b1-ad8b-d1a19829f03e",
      "intake": {
        "numEmployees": {
          "type": "ANSWER",
          "answer": "55",
          "qid": "numEmployees"
        },
        "isNonProfit": {
          "type": "ANSWER",
          "answer": "YES",
          "qid": "isNonProfit"
        },
        "claimInLast12Mo": {
          "type": "ANSWER",
          "answer": "12",
          "qid": "claimInLast12Mo"
        }
      }
    }
  }
}