> For the complete documentation index, see [llms.txt](https://partner-docs.covergenius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner-docs.covergenius.com/offers/guides/displaying-the-offer.md).

# Displaying the Offer

Present an Offer to your customer after they choose a core product.

Core products include a laptop, a travel booking, and an event ticket.

The Offer panel combines live data from the Create Offer response with static elements that Cover Genius supplies. CG Elements renders both for you.

{% hint style="info" %}
This page describes the CG Elements approach. The SDK reads the Create Offer response and builds the panel. You do not map each field to your own UI. For the SDK itself, see the [CG Elements documentation](https://partner-docs.covergenius.com/elements).
{% endhint %}

### Key Components of an Offer

#### Dynamic components

These come from the Create Offer response.

1. **Price.** The price and finance details of each quote.
2. **Disclaimer.** The legal disclaimer text.
3. **Policy Wording Link.** The link to the Policy Disclosure Statement (PDS).
4. **Product Details.** The name, benefits, inclusions, and exclusions of each product.

#### Static components

These come from the `presentation` field of the response. The Cover Genius CSE team supplies or approves them.

* Trustpilot rating
* Graphical and brand elements
* Layout and design structure
* Marketing copy

{% hint style="warning" %}
The examples on this page show a single product. If you offer more than one product, the SDK shows the price, disclaimer, and PDS link of each product in its own option. Do not assume one product.
{% endhint %}

### Design Structure

Cover Genius offers standard layouts and layouts that fit your vertical, for example Travel, Parcel, Ticket, and Retail. The `presentation.layout` field of the response selects the layout. See [Layouts and Sections](https://partner-docs.covergenius.com/elements/reference/layouts).

The panel has five sections: header, top body, input body, bottom body, and footer.

### Rendering the Offer

Pass the complete Create Offer response to the SDK.

```js
import { registerElements, getElement } from '@covergenius/elements';

registerElements({ environment: 'production' });

const cgElement = getElement();

cgElement.on('change', ({ selectedProductIDs, declined }) => {
  // Keep the selected quote IDs for Confirm Offer.
});

cgElement.render(offerResponse);
```

```html
<cg-elements></cg-elements>
```

### API Response Mapping

The SDK maps each field of the response to a part of the panel. Use this section to check that your response holds the data that the panel needs.

#### 1. Price

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>products[].details.finance.price.total_amount</code> and the top-level <code>currency</code></td></tr><tr><td>Shown in</td><td>The price of each option in the input body</td></tr></tbody></table>

The SDK formats the number with the response `currency`. It does not use the `*_formatted` strings. To change the format, set `currencyConfig`. See [Currency and Language](https://partner-docs.covergenius.com/elements/guides/currency-and-language).

When the SDK combines several quotes into one option, it adds their amounts. A `null` amount counts as zero.

#### 2. Disclaimer

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>content.disclaimer_html</code> or <code>content.disclaimer</code></td></tr><tr><td>Shown in</td><td>The footer</td></tr></tbody></table>

The layout sets which field the footer uses. The HTML variant uses `disclaimer_html`. The text variant uses `disclaimer`.

The SDK builds the HTML variant from an allowed set of elements: paragraphs and links. It removes all other elements. It removes links with an unsafe protocol. You do not sanitize the HTML.

#### 3. Policy Wording Link

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>products[].details.pds_url</code> and, when present, <code>content.extras.ipid_url</code></td></tr><tr><td>Shown in</td><td>The options, the sub-heading, or the footer, as set by the layout</td></tr></tbody></table>

The link text comes from the response. When a part shows more than one link, a pipe (`|`) separates them.

#### 4. Offer Heading and Product Content

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>content.heading</code>, <code>content.sub_heading</code>, <code>content.products[].title</code>, <code>content.products[].description</code></td></tr><tr><td>Shown in</td><td>The header heading, the top body sub-heading, and the title and description of each option</td></tr></tbody></table>

#### 5. Benefits, Inclusions, and Exclusions

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>content.products[].benefits</code>, <code>inclusions</code>, and <code>exclusions</code></td></tr><tr><td>Shown in</td><td>The top body and in each option, as set by the layout</td></tr></tbody></table>

Each field is an object of keys and text values. The SDK renders each list. You do not loop over the keys.

#### 6. Call-to-Action Buttons

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>content.positive_cta</code>, <code>content.negative_cta</code>, <code>content.negative_cta_warning</code></td></tr><tr><td>Shown in</td><td>The accept button, the decline option, and the decline warning</td></tr></tbody></table>

The panel keeps the customer's choice. It sends a `change` event on each choice.

#### 7. Trust and Credibility

<table><thead><tr><th width="199"></th><th></th></tr></thead><tbody><tr><td>Source</td><td><code>content.credibility_message</code> and the review and testimonial fields in <code>content.extras</code></td></tr><tr><td>Shown in</td><td>The bottom body</td></tr></tbody></table>

### What you still own

* Send the complete response to the browser.
* Keep `selectedProductIDs` from the `change` event.
* Call Confirm Offer with those quote IDs after the customer completes your checkout.
* Show your checkout without the offer if the `error` event fires.

See [Handling Selection](https://partner-docs.covergenius.com/elements/guides/handling-selection).

### Required response fields

<table><thead><tr><th width="199">Field</th><th>Why</th></tr></thead><tbody><tr><td><code>presentation</code></td><td>Names the layout and theme. Without it, the SDK shows no panel.</td></tr><tr><td><code>products</code></td><td>The quotes and their prices.</td></tr><tr><td><code>content</code></td><td>The text of the panel. Do not set <code>include_content=false</code> on the request.</td></tr><tr><td><code>product_rules</code></td><td>Sets how many options the customer can choose.</td></tr><tr><td><code>currency</code></td><td>Formats the prices.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://partner-docs.covergenius.com/offers/guides/displaying-the-offer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
