> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Return of Retailers - ret_*

> Retailer-provided master and transactional data: products, hierarchies, stores, chains and purchases. Premium service in both tiers.

The Return of Retailers package contains retailer provided master and transactional data, covering what a retailer sells and what is available and purchased. As the package contains data where the retailer is the source of truth, this package in both available tiers is treated as a Premium service, which is associated with a cost to provide. Request further details from Lobyco Customer Success if you would like this service provided.

## Scope

This package includes:

* Purchase transactions, including line items, discounts and taxes
* Product catalog definitions and category hierarchies
* Product master data and product properties
* Retailer structure data (chains, store to chain mapping)

It does not include customer identity, loyalty program data, promotion configuration or outbound communication activity data.

## Key Principle

The Return of Retailers package represents retailer level assortment and sales activities.

It is about products, stores and transactions, not who the customer is.

## Product Catalog — Barcode — `ret_barcode`

### Definition

| Property  | Type   | Description                                             |
| --------- | ------ | ------------------------------------------------------- |
| Id        | long   | Internal identifier for the barcode (EAN/UPC) record    |
| ProductId | long   | Foreign key referencing the Product table (Primary Key) |
| Barcode   | string | EAN/UPC code (Primary Key)                              |

### Sample data

| Id   | ProductId | Barcode       |
| ---- | --------- | ------------- |
| 1001 | 1061      | 5941234567890 |
| 1002 | 1084      | 5019876543217 |
| 1003 | 1038      | 5123456789056 |

## Product Catalog — Hierarchy — `ret_hierarchy`

### Definition

| Property         | Type   | Description                                       |
| ---------------- | ------ | ------------------------------------------------- |
| Id               | int    | Identifier for the hierarchy node (Primary Key)   |
| DepthId          | int    | Foreign key referencing the Hierarchy Level table |
| ParentId         | int    | Foreign key referencing the parent hierarchy node |
| Name             | string | Name of the hierarchy node                        |
| ExternalId       | string | External identifier for the hierarchy node        |
| ExternalParentId | string | External identifier for the parent hierarchy node |
| ExternalDepth    | int    | External depth level of the hierarchy node        |

### Sample data

| Id | DepthId | ParentId | Name       | ExternalId | ExternalParentId | ExternalDepth |
| -- | ------- | -------- | ---------- | ---------- | ---------------- | ------------- |
| 1  | 2       | 43       | Vegetables | 091        | 039              | 2             |
| 2  | 1       | 11       | Cigarettes | 093        | 034              | 1             |
| 3  | 2       | 39       | Meat       | 055        | 012              | 2             |

## Product Catalog — Hierarchy Level — `ret_hierarchy_level`

### Definition

| Property      | Type   | Description                                                   |
| ------------- | ------ | ------------------------------------------------------------- |
| DepthId       | int    | Unique identifier for the hierarchy level depth (Primary Key) |
| Name          | string | Name of the hierarchy level                                   |
| ExternalDepth | int    | External identifier for the hierarchy level depth             |

### Sample data

| DepthId | Name       | ExternalDepth |
| ------- | ---------- | ------------- |
| 1       | Root       | 1             |
| 4       | Subsection | 4             |
| 3       | Section    | 3             |

## Product Catalog — Product — `ret_product`

### Definition

| Property    | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| Id          | long   | Unique identifier for the product (Primary Key) |
| HierarchyId | int    | Foreign key referencing the Hierarchy table     |
| ExternalId  | string | External identifier for the product             |
| Name        | string | Name of the product                             |

### Sample data

| Id   | HierarchyId | ExternalId | Name             |
| ---- | ----------- | ---------- | ---------------- |
| 1001 | 84          | 105        | Peanut Butter    |
| 1002 | 10          | 823        | Diet Soda        |
| 1003 | 290         | 829        | Nivea Hand Cream |

## Product Catalog — Product Property — `ret_product_property`

### Definition

| Property      | Type   | Description                                             |
| ------------- | ------ | ------------------------------------------------------- |
| Id            | long   | Internal identifier for the product property record     |
| ProductId     | long   | Foreign key referencing the Product table (Primary Key) |
| BrandId       | string | Identifier for the brand associated with the product    |
| BrandName     | string | Name of the brand associated with the product           |
| SaleUnit      | string | Unit of sale for the product                            |
| WeightUnit    | string | Unit of weight for the product                          |
| UnitOfMeasure | string | Unit of measurement for the product                     |

### Sample data

| Id   | ProductId | BrandId | BrandName | SaleUnit | WeightUnit | UnitOfMeasure |
| ---- | --------- | ------- | --------- | -------- | ---------- | ------------- |
| 5001 | 1021      | 941     | Samsung   | piece    | g          | piece         |
| 5002 | 1032      | 102     | Nivea     | pack     | g          | piece         |
| 5003 | 1073      | 23      | Fairtrade | box      | kg         | bag           |

## Purchase — `ret_purchase`

### Definition

| Property                 | Type      | Description                                      |
| ------------------------ | --------- | ------------------------------------------------ |
| PurchaseId               | string    | Unique identifier for the purchase (Primary Key) |
| CustomerId               | string    | Identifier for the customer                      |
| StoreId                  | string    | Identifier for the store                         |
| TotalAmount              | decimal   | Total amount of the purchase                     |
| PurchaseBusinessDateTime | timestamp | Time when the purchase took place                |
| PurchaseDateTimeUtc      | timestamp | UTC time when the purchase took place            |
| PurchaseBusinessDate     | date      | Date when the purchase took place                |

### Sample data

| PurchaseId | CustomerId | StoreId | TotalAmount | PurchaseBusinessDateTime | PurchaseDateTimeUtc | PurchaseBusinessDate |
| ---------- | ---------- | ------- | ----------- | ------------------------ | ------------------- | -------------------- |
| 9001       | 001        | 031     | 129.99      | 2026-03-01 10:45:00      | 2026-03-01 08:45:00 | 2026-03-01           |
| 9002       | 042        | 032     | 59.50       | 2026-02-20 15:10:00      | 2026-02-20 13:10:00 | 2026-02-20           |
| 9003       | 043        | 043     | 899.00      | 2026-01-18 08:05:00      | 2026-01-18 06:05:00 | 2026-01-18           |

## Purchase — Discount — `ret_purchase_discount`

### Definition

| Property                 | Type      | Description                                                                    |
| ------------------------ | --------- | ------------------------------------------------------------------------------ |
| PurchaseId               | string    | Unique identifier for the purchase (Composite Key)                             |
| Name                     | string    | Name of the discount                                                           |
| TotalDiscountAmount      | decimal   | Total amount of discount                                                       |
| CouponId                 | string    | Identifier for the coupon                                                      |
| AppliedProducts          | string    | The list of sequence numbers of products for which this discount is applied to |
| SequenceNumber           | long      | Sequence number of the discounted product on the receipt (Composite Key)       |
| PurchaseBusinessDateTime | timestamp | Time when the purchase took place                                              |
| PurchaseDateTimeUtc      | timestamp | UTC time when the purchase took place                                          |
| PurchaseBusinessDate     | date      | Date when the purchase took place                                              |

### Sample data

| PurchaseId | Name          | TotalDiscountAmount | CouponId | AppliedProducts | SequenceNumber | PurchaseBusinessDateTime | PurchaseDateTimeUtc | PurchaseBusinessDate |
| ---------- | ------------- | ------------------- | -------- | --------------- | -------------- | ------------------------ | ------------------- | -------------------- |
| 9001       | Spring Sale   | 10.00               | 031      | 1,2             | 1              | 2026-03-01 10:45:00      | 2026-03-01 08:45:00 | 2026-03-01           |
| 9002       | Loyalty Bonus | 5.50                | 032      | 3               | 3              | 2026-02-20 15:10:00      | 2026-02-20 13:10:00 | 2026-02-20           |
| 9003       | Promo Bundle  | 50.00               | 023      | 4,6             | 2              | 2026-01-18 08:05:00      | 2026-01-18 06:05:00 | 2026-01-18           |

## Purchase — Payment — `ret_purchase_payment`

### Definition

| Property                 | Type      | Description                                             |
| ------------------------ | --------- | ------------------------------------------------------- |
| PurchaseId               | string    | Unique identifier for the purchase (Composite Key)      |
| Amount                   | decimal   | Amount of the payment                                   |
| CurrencyCode             | string    | Code for the currency used in the payment               |
| ConversionRate           | decimal   | Rate of conversion of the currency                      |
| PaymentType              | string    | Type of payment (e.g. Cash, Card) (Composite Key)       |
| CardPan                  | string    | Primary Account Number of the card used in the purchase |
| SequenceNumber           | long      | Sequence number on the receipt                          |
| PurchaseBusinessDateTime | timestamp | Time when the purchase took place                       |
| PurchaseDateTimeUtc      | timestamp | UTC time when the purchase took place                   |
| PurchaseBusinessDate     | date      | Date when the purchase took place                       |

### Sample data

| PurchaseId | Amount | CurrencyCode | ConversionRate | PaymentType | CardPan          | SequenceNumber | PurchaseBusinessDateTime | PurchaseDateTimeUtc | PurchaseBusinessDate |
| ---------- | ------ | ------------ | -------------- | ----------- | ---------------- | -------------- | ------------------------ | ------------------- | -------------------- |
| 9001       | 129.99 | EUR          | 1.00           | Card        | 4532XXXXXXXX1234 | 1              | 2026-03-01 10:45:00      | 2026-03-01 08:45:00 | 2026-03-01           |
| 9002       | 59.50  | EUR          | 1.00           | Cash        | NULL             | 3              | 2026-02-20 15:10:00      | 2026-02-20 13:10:00 | 2026-02-20           |
| 9003       | 899.00 | USD          | 0.92           | Card        | 5421XXXXXXXX7788 | 2              | 2026-01-18 08:05:00      | 2026-01-18 06:05:00 | 2026-01-18           |

## Purchase — Product — `ret_purchase_product`

### Definition

| Property                 | Type      | Description                                                   |
| ------------------------ | --------- | ------------------------------------------------------------- |
| PurchaseId               | string    | Unique identifier for the purchase (Composite Key)            |
| ProductId                | string    | Identifier for the product (Composite Key)                    |
| Quantity                 | decimal   | Quantity of the product                                       |
| UnitOfMeasure            | string    | Unit of measurement for the product                           |
| Price                    | decimal   | Price of the product                                          |
| OriginalPrice            | decimal   | Original price of the product                                 |
| UnitPrice                | decimal   | Price per unit of the product                                 |
| SequenceNumber           | int       | Sequence number of the product on the receipt (Composite Key) |
| CategoryId               | string    | Identifier for the category of product                        |
| PurchaseBusinessDateTime | timestamp | Time when the purchase took place                             |
| PurchaseDateTimeUtc      | timestamp | UTC time when the purchase took place                         |
| PurchaseBusinessDate     | date      | Date when the purchase took place                             |

### Sample data

| PurchaseId | ProductId | Quantity | UnitOfMeasure | Price  | OriginalPrice | UnitPrice | SequenceNumber | CategoryId | PurchaseBusinessDateTime | PurchaseDateTimeUtc | PurchaseBusinessDate |
| ---------- | --------- | -------- | ------------- | ------ | ------------- | --------- | -------------- | ---------- | ------------------------ | ------------------- | -------------------- |
| 9001       | 1001      | 1.0      | pcs           | 129.99 | 149.99        | 129.99    | 1              | 013        | 2026-03-01 10:45:00      | 2026-03-01 08:45:00 | 2026-03-01           |
| 9002       | 1002      | 2.0      | pcs           | 29.75  | 35.00         | 14.88     | 5              | 002        | 2026-02-20 15:10:00      | 2026-02-20 13:10:00 | 2026-02-20           |
| 9003       | 1003      | 1.0      | pcs           | 899.00 | 999.00        | 899.00    | 2              | 023        | 2026-01-18 08:05:00      | 2026-01-18 06:05:00 | 2026-01-18           |

## Purchase — Tax — `ret_purchase_tax`

### Definition

| Property                 | Type      | Description                                               |
| ------------------------ | --------- | --------------------------------------------------------- |
| PurchaseId               | string    | Unique identifier for the purchase (Composite Key)        |
| TaxableAmount            | decimal   | Taxable amount for the purchase (Composite Key)           |
| Amount                   | decimal   | Amount of tax applied to the purchase                     |
| Percentage               | decimal   | Percentage of tax applied to the purchase (Composite Key) |
| SequenceNumber           | long      | Sequence number on the receipt (Composite Key)            |
| PurchaseBusinessDateTime | timestamp | Time when the purchase took place                         |
| PurchaseDateTimeUtc      | timestamp | UTC time when the purchase took place                     |
| PurchaseBusinessDate     | date      | Date when the purchase took place                         |

### Sample data

| PurchaseId | TaxableAmount | Amount  | Percentage | SequenceNumber | PurchaseBusinessDateTime | PurchaseDateTimeUtc | PurchaseBusinessDate |
| ---------- | ------------- | ------- | ---------- | -------------- | ------------------------ | ------------------- | -------------------- |
| 9001       | 18.39         | 229.99  | 8.00       | 1              | 2026-03-01 10:45:00      | 2026-03-01 08:45:00 | 2026-03-01           |
| 9002       | 7.82          | 78.23   | 10.00      | 1              | 2026-02-20 15:10:00      | 2026-02-20 13:10:00 | 2026-02-20           |
| 9003       | 98.03         | 1225.40 | 8.00       | 2              | 2026-01-18 08:05:00      | 2026-01-18 06:05:00 | 2026-01-18           |

## Store — Chains — `ret_chains`

### Definition

| Property    | Type   | Description                                   |
| ----------- | ------ | --------------------------------------------- |
| Id          | string | Unique identifier for the chain (Primary Key) |
| SurrogateId | string | Surrogate identifier for the chain            |
| Name        | string | Name of the chain                             |

### Sample data

| Id  | SurrogateId | Name  |
| --- | ----------- | ----- |
| 001 | 061         | Coop  |
| 002 | 034         | Profi |
| 003 | 073         | Coop  |

## Store — Stores — `ret_stores`

### Definition

| Property           | Type   | Description                                     |
| ------------------ | ------ | ----------------------------------------------- |
| Id                 | string | Unique identifier for the store (Primary Key)   |
| Name               | string | Name of the store                               |
| RegistrationNumber | string | Registration number of the store                |
| Country            | string | Country where the store is located              |
| City               | string | City where the store is located                 |
| Street             | string | Street where the store is located               |
| StreetNumber       | string | Number on the street where the store is located |
| PostalCode         | string | Postal code of the store location               |
| TimeZone           | string | Timezone of the store location                  |
| Status             | string | Status of the store                             |
| Type               | string | Type of store                                   |
| Location           | string | Geographical location of the store              |
| ChainId            | string | Identifier for the chain                        |

### Sample data

| Id  | Name          | RegistrationNumber | Country | City       | Street      | StreetNumber | PostalCode | TimeZone | Status | Type     | Location        | ChainId |
| --- | ------------- | ------------------ | ------- | ---------- | ----------- | ------------ | ---------- | -------- | ------ | -------- | --------------- | ------- |
| 001 | Coop DK       | 041                | DK      | Copenhagen | Main Street | 12A          | 21005      | CET      | Active | Internal | 55.6761,12.5683 | 031     |
| 002 | Southern Coop | 022                | UK      | Bristol    | River Road  | 44           | 80050      | GMT      | Closed | Public   | 56.1629,10.2039 | 022     |
| 003 | Coop DK       | 093                | DK      | Aarhus     | Harbor Lane | 5B           | 5030       | CET      | Active | Public   | 55.4038,10.4024 | 093     |
