> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/connectors/pos/cegid/customer-data-and-loyalty/receipts-vouchers-and-sales-documents.md).

# Receipts, vouchers, and sales documents

Use Cegid Retail Y2 sales documents, receipt PDFs, gift cards, and stored value in wallet pass journeys.

Beyond the customer record and loyalty, Cegid Retail Y2 holds transaction history and stored value. The connector exposes both to wallet journeys: sales documents and generated receipt PDFs, and the vouchers, gift cards, and certificates attached to a customer.

<details>

<summary><strong>Real-world examples</strong></summary>

* A customer opens a recent receipt from a wallet pass instead of keeping the paper copy.
* A gift card balance appears on a pass and is checked before the customer reaches the till.
* A click-and-collect order is exposed on the pass so staff can find it by scanning.

</details>

### Sales documents

The connector reads sales documents individually, by their Cegid key or by an external reference, and can retrieve a list of recent documents for a customer. These populate transaction history in a wallet journey.

### Receipt PDFs

Where a rendered document is required rather than the underlying data, the connector generates a receipt PDF through Cegid. Generation is asynchronous: the connector requests the document, waits for Cegid to report it ready, then downloads it.

Which template Cegid uses is set per connection, as described in [Configure the Cegid Retail Y2 connector](/connectors/pos/cegid/setup-and-configuration/connect-with-cegid-retail-y2.md). Leaving the template empty uses the Cegid default.

{% hint style="warning" %}
Receipt settings and business notification settings share the same connection. Where another system relies on the notification subscription, verify that subscription after changing receipt settings.
{% endhint %}

### Vouchers, gift cards, and stored value

Cegid groups vouchers, gift cards, certificates, deposits, and customer accounts together. The connector reads those attached to a customer and exposes them in separate collections, so a template can address the relevant kind directly.

| Collection                    | Contains                                      |
| ----------------------------- | --------------------------------------------- |
| `y2.bons.giftCards`           | Gift cards.                                   |
| `y2.bons.giftCertificates`    | Gift certificates.                            |
| `y2.bons.loyaltyCertificates` | Certificates issued by the loyalty programme. |
| `y2.bons.accounts`            | Customer accounts.                            |
| `y2.bons.deposits`            | Deposits.                                     |

Where a pass represents a gift card specifically, its identifier is verified against the card's own customer before the pass is served, so that a gift card pass cannot be used to read another customer's balance.

### Held receipts

A flow step can raise a held receipt in Cegid: a document created in advance and completed at the till. It is used for click-and-collect and similar journeys where the transaction is prepared before the customer arrives.

### Refreshing passes after an order

A scheduled task refreshes passes affected by recent orders, looking back one hour by default. It provides a reliable refresh where business notifications are not enabled, at a coarser granularity.

### FAQ

<details>

<summary><strong>Why is a receipt not generating?</strong></summary>

The configured template identifier is the first thing to check, followed by whether the document exists in Cegid under the key being requested. Generation failures are reported by Cegid rather than by the connector.

</details>

<details>

<summary><strong>Do receipt settings apply to every store?</strong></summary>

They apply per connection. Where a brand runs one connection per store, a template set on some connections and not others produces different behaviour by store.

</details>


---

# 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://docs.thewalletcrew.io/connectors/pos/cegid/customer-data-and-loyalty/receipts-vouchers-and-sales-documents.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.
