SmartCircuit events
SmartCircuit talks to the Partner Web Application (PWA) through DOM custom events. Listening events come from SmartCircuit; sending events go from the PWA to SmartCircuit with the quote, purchase or note decline data.
Listening events
azpComponentReady
The PWA must wait for this event before interacting with SmartCircuit.
azpInsuranceSelected and azpInsuranceDeclined
The PWA needs the customer’s choice to show the insurance price in the booking total and to decide whether to send a purchase request or a note decline request.
azpLoadingDefaultOffer
If no optimized offer arrives in time after a quote request, SmartCircuit displays a single default offer. This is rare, and it keeps the offer on the page.
azpPurchaseResponse
Handling this event is optional but recommended to confirm the purchase succeeded. A failure message includes a unique partner booking ID that can be used to reprocess payment later.
azpNoteDeclineResponse
AzP responds with SUCCESS when it receives the note decline.
azpFatalError
Something went wrong, usually with the quote service, and no quote can be displayed. Hide any insurance-related elements when this event arrives.
Sending events
azpQuoteRequest
Send this once azpComponentReady has fired and the PWA has enough information to quote. The event detail is a quote request object.
azpPurchaseRequest
Send this when the customer completes the core booking with insurance selected. The event detail is a purchase request object.
azpNoteDeclineRequest
Send this each time a booking completes with insurance declined. AzP matches it to the original quote request to measure performance and drive optimization. It needs no data.

