The offers lifecycle
An offer is an option for production protection insurance presented to end users, most likely either on a product details page or a shopping cart. Evy offers are comprised of information like the price, terms, and coverage types. Evy's SDK simplifies the management of attached offers and ensures that they are stored throughout a user's session and periodically refreshed to ensure that they are still valid.
Lifecycle of the Evy offers
Integration scenario with the Inline offer component.
- Product page loads
- Widgets are instantiated
- SDK retrieves offers based on widgets configuration
- When offers are ready, they are displayed in widgets
- The user selects an offers → The offer is selected
- The user adds the product → The selected offer is converted to attached (and saved in local storage)
- The user continues their shopping
- The user goes to the checkout page
- When entering the payment flow, scripts use the SDK to get all the attached offers and send them to the backend to process them
From this scenario, you can see that offers can have three states:
- retrieved from the server
- selected when they are chosen
- attached when added to the cart with an item
When an offer is attached, it is saved in the browser's local storage so that they can be saved until the customer reaches the checkout. At the checkout, the attached offers should be sent to the server.
When using the modal widget, you do not need to convert the offer from selected to attached.
Implementation of the Evy offer flow
We recommend that you use one of our library to implement this flow.
Depending on your needs and technical requirements, you will need to choose one or the other:
Evy SDK | Evy Stately | |
---|---|---|
Can be used with a framework | no | yes |
Built-in components | yes | no |
Updated 12 days ago