> For the complete documentation index, see [llms.txt](https://docs.zaui.com/developer-api-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaui.com/developer-api-documents/databridge-integration-guide.md). Agents can also search and read this documentation through its [MCP server](https://docs.zaui.com/developer-api-documents/~gitbook/mcp).

# DataBridge Integration Guide

DataBridge provides a standardized nightly export of Zaui data for customer-managed systems like data warehouses, finance platforms, CRM systems, reporting environments, & business intelligence tools.

DataBridge supports scheduled data delivery, including nightly exports, and provides the canonical data required to build reliable downstream integrations.

For organizations that do not want to build their own transformation logic, Zaui can also provide supported transformation layers that prepare DataBridge data for specific destinations, including **Microsoft Power BI** and **Microsoft Dynamics 365 (D365)**.

The appropriate integration approach depends on whether your organization needs:

* **Canonical DataBridge exports:** Standardized Zaui datasets that your organization loads and transforms.
* **Standard transformations:** Zaui-managed outputs structured for supported downstream systems.
* **Custom transformations:** Customer-specific mappings, calculations, accounting structures, or data models developed through Zaui Connectivity.

**For custom transformation requirements or additional data layering, contact the Zaui Connectivity team before implementation.** Connectivity can review the destination system, required fields, business rules, and supported integration options.

### How DataBridge Works

A standard DataBridge integration consists of retrieving the available export package, reading its manifest, validating and loading the included datasets, and repeating that process for subsequent packages.

**Canonical DataBridge workflow:**

Zaui\
↓\
DataBridge export\
↓\
DataBridge manifest\
↓\
Canonical CSV datasets\
↓\
Customer staging or data warehouse\
↓\
Customer-managed transformation\
↓\
Finance / BI / CRM / Data Warehouse

**Zaui-managed transformation workflow:**

Zaui\
↓\
DataBridge canonical data\
↓\
Zaui-managed transformation layer\
↓\
Versioned destination-specific output\
↓\
Stable transformation URL\
↓\
Power BI / D365 / Supported destination

The distinction is important:

* Canonical DataBridge exposes standardized Zaui data.
* A transformation prepares that data for a specific destination or business requirement.
* Customers consuming a Zaui-managed transformation generally do not need to download and interpret the underlying canonical ZIP files.
* Custom transformations may require additional development, validation, and configuration.

***

## 1. Quick Start

A standard canonical DataBridge integration follows eight steps.

Customers using a Zaui-managed transformation should also review **Section 3 — Transformations**, as the delivery and consumption process is different.

#### Step 1 — Get Access

Install and enable DataBridge for the appropriate Zaui organization.

The DataBridge app provides the customer-specific access information required to retrieve exports.

Treat the URLs and access information provided by the app as configuration.

**Do not construct DataBridge URLs from organization IDs, system IDs, CDN paths, or other internal Zaui identifiers.**

Although DataBridge storage paths may contain organization-specific identifiers, these are implementation details and should not be used to generate URLs.

For integrations with multiple Zaui organizations, configure each organization's export source independently unless a consolidated output has been explicitly provided.

#### Step 2 — Discover the Available Packages

Use the DataBridge location provided by the app to discover available exports.

Standard canonical processing uses two main package types:

**Bootstrap**

Establishes the initial state of the destination, including the reference datasets needed to interpret booking records.

**Daily**

Contains bookings changed during the relevant export period, together with their current child records and supporting reference data.

A standard integration should process the bootstrap before subsequent daily packages.

DataBridge may also provide separately coordinated historical baseline, backfill, correction, or replay outputs for supported use cases. These are not interchangeable with the normal daily export sequence.

Important:

* Do not assume that the first daily export contains every historical booking.
* Do not treat an incremental export as a full historical extract.
* Do not guess nightly filenames or construct package locations.
* Use only the package locations advertised by DataBridge.
* Coordinate historical-data requirements with Zaui before production ingestion.

#### Step 3 — Read the Manifest

The manifest is the entry point for discovering and processing DataBridge exports.

The DataBridge discovery manifest is provided through the app's configured location. Where applicable, the published manifest is named:

`databridge_manifest.json`

Treat its URL as an opaque value supplied by Zaui.

A package manifest describes the contents of an individual export and provides the metadata required for validation and processing.

Depending on the package and manifest version, this includes:

* Package ID
* Run ID
* Export type
* Schema version
* Export-period start and end
* Previous cursor
* Included datasets and files
* Record counts
* File sizes
* SHA-256 checksums
* Package metadata

**Always use the manifest to determine which files and packages should be processed.**

Do not assume that all exports have identical file contents or that historical, daily, and transformed outputs share the same processing rules.

#### Step 4 — Download and Validate the Data Files

Download the advertised package and safely extract its contents.

For the canonical dataset described in this guide, the standard files are:

* `organization.csv`
* `customers.csv`
* `bookings.csv`
* `booking_items.csv`
* `taxes.csv`
* `offerings.csv`
* `price_codes.csv`
* `channels.csv`
* `booking_transactions.csv`
* `agents.csv`

The actual files included in an export are determined by its manifest and schema version.

Before loading data:

1. Verify the package ID and expected schema version.
2. Validate the downloaded package size and checksum.
3. Safely extract the ZIP archive.
4. Validate individual files against their manifest metadata.
5. Confirm expected record counts.
6. Reject or quarantine packages that fail validation.

Use a standards-compliant CSV parser.

Identify fields by their documented header names rather than relying exclusively on column position.

#### Step 5 — Load the Canonical Datasets

Load the datasets into staging tables or directly into the destination data model.

DataBridge uses two principal loading approaches.

**Stable-key upserts**

Used for booking headers and reference records.

When a record with an existing stable identifier appears in a subsequent export, update that record instead of creating a duplicate.

**Complete booking child-set replacement**

Used for the booking's related line items, tax rows, and transaction records.

When a booking is emitted again, replace the previously stored child records for that booking with the complete current set supplied in the package.

Do not treat every row in a nightly export as a new record.

#### Step 6 — Join the Datasets

Use the documented identifiers to establish relationships between records.

Primary relationships include:

| Source field                      | Related field              |
| --------------------------------- | -------------------------- |
| `booking_items.bookingId`         | `bookings.bookingId`       |
| `booking_items.customerId`        | `customers.customerId`     |
| `booking_items.offeringId`        | `offerings.offeringId`     |
| `booking_items.priceCodeId`       | `price_codes.priceCodeId`  |
| `booking_items.channelId`         | `channels.channelId`       |
| `taxes.bookingId`                 | `bookings.bookingId`       |
| `booking_transactions.bookingId`  | `bookings.bookingId`       |
| `booking_transactions.lineItemId` | `booking_items.lineItemId` |
| `booking_items.parentLineItemId`  | `booking_items.lineItemId` |

The parent-line relationship is particularly important when processing subordinate activity options or other supported child booking items.

Do not infer parent-child relationships by parsing the text format of an unrelated source identifier.

Identifiers should be treated as belonging to the exporting Zaui organization unless otherwise documented.

If records from multiple Zaui organizations are combined, namespace organization-scoped identifiers to prevent collisions.

#### Step 7 — Process Each Nightly Package

After the bootstrap has been loaded, process daily packages in cursor order.

For each daily package, verify:

`package.previousCursor == storedCursor`

After the entire package has successfully committed, store:

`storedCursor = package.exportPeriod.end`

Example:

Bootstrap\
`end = 2026-08-01T06:00:00Z`

↓

Daily 1\
`previousCursor = 2026-08-01T06:00:00Z`\
`end = 2026-08-02T06:00:00Z`

↓

Daily 2\
`previousCursor = 2026-08-02T06:00:00Z`\
`end = 2026-08-03T06:00:00Z`

If `previousCursor` does not match the stored cursor, stop processing and investigate.

Do not skip forward to a newer package.

Advance the cursor only after the entire package has been successfully committed.

Reporting periods may follow the organization's configured time zone and are not necessarily exactly 24 hours during daylight-saving transitions.

#### Step 8 — Transform Into the Destination Model

Canonical DataBridge provides standardized Zaui datasets. It does not prescribe the final schema of your destination system.

After loading the canonical data, transform it as required.

Common transformations include:

* Financial account mapping
* Revenue and tax classification
* Booking and payment reconciliation
* Data normalization
* Dimensional modelling
* Aggregation and reporting measures
* Customer and channel attribution
* Activity and pricing-option relationships
* Destination-specific field structures
* Custom reporting or integration schemas

Organizations can build these transformations independently or use a supported Zaui-managed transformation.

For Zaui-managed outputs, continue with the next section.

***

## 2. Data Model

DataBridge exports booking data together with the reference data required to interpret it.

The following describes the canonical datasets and established field relationships. Exact availability and schema details must be checked against the version declared by the export.

### organization.csv

Describes the Zaui organization generating the export.

**Primary key:** `organizationId`

Fields:

`organizationId`, `organizationName`, `addressLine1`, `city`, `region`, `postalCode`, `countryCode`, `timeZone`, `currencyCode`

`timeZone` is the organization's IANA time zone.

When consolidating data from multiple organizations, retain organization identity in the destination.

### customers.csv

Contains exported customer profiles.

**Primary key:** `customerId`

Fields:

`customerId`, `status`, `firstName`, `lastName`, `email`, `phone`, `addressLine1`, `addressLine2`, `city`, `region`, `postalCode`, `countryCode`, `sourceCreatedAt`

Customer relationships are associated with booking items rather than directly with the booking header.

Depending on the configured personal-data mode:

* **Included:** Approved contact and address fields may be populated.
* **Redacted:** Direct customer details are omitted while supported stable identifiers and non-personal relationships remain available.

Do not assume every customer record contains contact information.

### bookings.csv

Contains booking headers.

**Primary key:** `bookingId`

Fields:

`bookingId`, `bookingReference`, `bookingStatus`, `bookedAt`, `cancelledAt`, `currencyCode`, `subtotalAmount`, `taxAmount`, `totalAmount`, `balanceDueAmount`, `lastDateModifiedAt`

`bookingReference` is the customer-facing booking reference.

A booking may be emitted again when its status, financial values, or related data changes.

Update the existing booking record rather than creating another booking with the same stable ID.

### booking\_items.csv

Contains sold booking lines and supported subordinate activity-option records.

Fields:

`lineItemId`, `parentLineItemId`, `bookingId`, `customerId`, `customerSequence`, `packageId`, `offeringId`, `commissionedAgentId`, `channelId`, `portalId`, `portalName`, `internetBooked`, `priceCodeId`, `itemStatus`, `quantity`, `seniors`, `adults`, `students`, `children`, `infants`, `travelDate`, `travelTime`, `serviceStartAt`, `currencyCode`, `subtotalAmount`, `taxAmount`, `cancelledAt`, `sourceCreatedAt`, `lastDateModifiedAt`

#### Customer attribution

`customerSequence = 1` identifies the purchaser or lead customer relationship.

Values of 2 and above represent additional guest-detail associations.

Passenger-type fields such as adults, children, students, seniors, and infants are aggregate sold quantities, not individual passenger records.

#### Offering attribution

`offeringId` uses a namespaced identifier:

`<offeringType>:<sourceId>`

Examples:

* `activity:501`
* `package:42`
* `pass:90`
* `gift_certificate:18`

Supported offering prefixes include:

* `activity`
* `activity_option`
* `merchandise_product`
* `package`
* `pass`
* `gift_certificate`

#### Parent-child relationships

`parentLineItemId` links a supported subordinate booking item to its parent booking item.

This is important for activity pricing options and other related booking lines.

A subordinate pricing option should not automatically be treated as an independent parent activity.

Where the consuming system requires inherited accounting codes, classifications, or other parent attributes, use the documented parent relationship available in the applicable schema or transformation.

Do not derive the relationship by parsing `source_id` or assuming that the formatting of an identifier is permanent.

If a destination-specific transformation does not expose the required parent reference, contact Zaui Connectivity to review the mapping.

#### Channel and portal attribution

`channelId` identifies the booking channel and references `channels.csv.channelId`.

`portalId` identifies the associated Zaui portal where applicable.

`portalName` provides the corresponding portal name.

`internetBooked` indicates whether the booking was made through the internet booking flow.

#### Financial and passenger allocations

Booking item financial values should be preserved using exact decimal storage.

Passenger quantities represent the sold allocation associated with the line.

For destination-specific accounting transformations, allocations may need to distinguish:

* Parent activity revenue
* Pricing-option revenue
* Adult, child, infant, student, or senior quantities
* Taxable and non-taxable amounts
* Zero-priced passenger categories
* Package components

These distinctions are particularly important when preparing finance-system output.

Do not assume that every pricing option has the same tax treatment as its parent activity.

### taxes.csv

Contains current booking tax rows.

Fields:

`bookingId`, `taxName`, `amount`, `lastDateModifiedAt`

There is no independent row-level tax identifier in this canonical dataset.

Duplicate tax names may legitimately occur.

Do not collapse duplicate tax names unless the destination's reconciliation requirements explicitly support doing so.

For destination-specific line-level tax attribution, use the supported transformation's documented line relationships and allocation rules.

### offerings.csv

Contains offering definitions used to interpret sold booking items.

**Primary key:** `offeringId`

Fields:

`offeringId`, `offeringType`, `sellableFamily`, `activitySubtype`, `offeringName`, `status`, `bookableFrom`, `bookableTo`, `sourceCreatedAt`, `sourceModifiedAt`

The standard canonical dataset does not provide comprehensive enrichment for offering categories, departures, destinations, locations, journeys, routes, stops, or vehicles.

Customers requiring additional offering enrichment should discuss the use case with Zaui Connectivity.

### price\_codes.csv

Contains price-code definitions.

**Primary key:** `priceCodeId`

Fields:

`priceCodeId`, `priceCodeName`, `sourceCreatedAt`

Price codes provide descriptive information about sold booking items.

They do not contain enough configuration to reconstruct Zaui's complete pricing engine.

### channels.csv

Contains booking-channel definitions.

**Primary key:** `channelId`

Fields:

`channelId`, `channelName`, `channelType`, `sourceCreatedAt`

`channelId` is referenced by `booking_items.csv`.

### booking\_transactions.csv

Contains financial transactions associated with bookings.

Fields:

`transactionId`, `bookingId`, `lineItemId`, `resellerAgentId`, `resellerBookingReference`, `resellerRateName`, `resellerRate`, `resellerRateAmount`, `transactionMethodName`, `ledgerEntry`, `transactionStatus`, `amount`, `currencyCode`, `processedAmount`, `processedCurrencyCode`, `exchangeRate`, `occurredAt`

Use `ledgerEntry` to determine debit or credit direction.

Do not infer ledger direction solely from the sign of `amount`.

Where populated, `lineItemId` associates a transaction with a booking item.

For currency-converted transactions, the documented relationship is:

`processedAmount = amount × exchangeRate`

Preserve monetary values using exact decimal storage and account for the destination's currency precision and rounding rules.

Historical records may not always contain the same line-level identity information as records created through newer booking or import workflows.

If line-level identity is required for accounting, validate the source records and the applicable transformation before importing financial output.

### agents.csv

Contains agent reference data exposed by DataBridge.

**Primary key:** `agentId`

Fields:

`agentId`, `agentType`, `agentName`, `status`, `sourceCreatedAt`

The established canonical dataset exposes employee agent records.

Commissioned seller and reseller agent records are not necessarily emitted through this dataset.

Do not assume every agent identifier found in booking data can be resolved through `agents.csv`.

***

## 3. Transformations

DataBridge supports two integration approaches:

1. Customers consume canonical datasets and build their own downstream data model.
2. Customers consume a supported Zaui-managed transformation that provides destination-specific output.

A transformation is an additional processing layer built on DataBridge data.

It can apply supported mapping and modelling rules so that the receiving system does not need to reproduce all canonical transformation logic.

### 3.1 Standard Transformations

Zaui has developed standard transformation capabilities for:

* Microsoft Power BI
* Microsoft Dynamics 365

These are distinct outputs and should not be treated as interchangeable.

Each transformation has its own:

* Transformation name
* Version
* Output structure
* Data-mapping rules
* Validation requirements
* Destination-specific behavior

A customer should select the transformation intended for its destination and verify that the enabled version meets its requirements.

Availability and enablement may depend on the organization's configuration and the supported release.

### 3.2 Stable Transformation URLs

When a Zaui-managed transformation is enabled, the customer can be provided with a stable transformation URL.

This URL is the integration point for retrieving the latest published output for that transformation.

**Customers consuming a supported transformation do not normally need to retrieve the underlying canonical DataBridge ZIP packages or construct DataBridge manifest URLs.**

Instead:

1. Obtain the transformation URL provided by Zaui.
2. Store it as integration configuration.
3. Retrieve the transformation output.
4. Validate the published output and applicable metadata.
5. Load the output into the destination system.
6. Repeat according to the agreed delivery schedule.

Do not construct transformation URLs from organization IDs, dates, run IDs, or version numbers.

Use the exact URL supplied by Zaui.

A stable URL simplifies integration maintenance because the customer does not need to discover individual canonical packages to obtain its destination-specific output.

However, **a stable URL does not mean the output schema will never change**.

Customers must still review transformation version information and compatibility requirements.

A latest-output URL also should not be treated as a substitute for historical archiving or as a guarantee that every previous output remains available.

### 3.3 Microsoft Power BI Transformation

The Power BI transformation prepares DataBridge data for reporting and analytical consumption.

It is intended to reduce the amount of canonical data modelling customers must perform before building Power BI reports.

Depending on the enabled version and configuration, the transformation can support:

* Booking and activity reporting
* Revenue analysis
* Booking status analysis
* Activity and offering attribution
* Channel-based reporting
* Customer-related reporting using permitted data
* Historical baseline ingestion
* Incremental reporting updates
* Reconciliation of transformed rows to source bookings

The transformation provides a structured reporting input.

It does not automatically create a complete customer-specific Power BI dashboard, semantic model, or report design.

Customers remain responsible for their own Power BI environment, report measures, refresh configuration, access controls, and business-specific calculations unless those services are separately agreed.

#### Historical data in Power BI

Historical reporting requirements should be identified before production activation.

Where a historical baseline is provided, it establishes the initial reporting population for the agreed historical scope.

Subsequent incremental outputs can then be used to maintain reporting data.

Do not assume that the first incremental Power BI output contains every historical or imported booking.

A historical baseline must be coordinated separately when required.

Historical baseline outputs and ordinary incremental outputs may have different processing and reconciliation requirements.

#### Power BI transformation versioning

Power BI transformations are versioned independently from the canonical DataBridge schema.

For example:

* Canonical schema: `2.0.0`
* Power BI transformation: `1.3`

These are examples of version identifiers used in the DataBridge transformation architecture.

The actual supported version for an organization must be determined from its configured output or accompanying release information.

A change to the canonical schema does not automatically mean the Power BI transformation version is identical.

### 3.4 Microsoft Dynamics 365 Transformation

The Dynamics 365 transformation prepares DataBridge booking and financial data for integration into a D365 environment.

It is intended to reduce the need for customers to reconstruct accounting relationships directly from canonical booking data.

Depending on the enabled version and configuration, it can support:

* Booking-related financial records
* Revenue-line preparation
* Payment and transaction mapping
* Tax allocation
* Activity and pricing-option relationships
* Package component accounting
* Passenger-category allocation
* Accounting-date-based exports
* Reconciliation and exception reporting

The transformation is designed to produce structured financial output for downstream processing.

**It is not a universal, preconfigured mapping for every Dynamics 365 installation.**

D365 environments may differ in their:

* Chart of accounts
* Financial dimensions
* Revenue recognition policies
* Tax configuration
* Payment methods
* Journal structure
* Entity and organizational mappings
* Import interfaces

These requirements must be reviewed during integration setup.

#### Revenue and pricing-option allocation

Financial output may need to distinguish between revenue belonging to a parent activity and revenue belonging to an associated pricing option.

The transformation should preserve those distinctions according to its documented version-specific mapping rules.

For example, a booking may contain:

* A parent activity
* An adult allocation
* A child allocation
* A zero-priced infant allocation
* A separately priced activity option

A correct destination mapping must avoid double-counting option revenue or incorrectly distributing tax across unrelated lines.

A zero-priced passenger category should not automatically receive a share of revenue or tax merely because it appears in the passenger allocation.

Likewise, a non-taxable pricing option should not inherit tax solely because the parent activity is taxable.

Actual allocations depend on the source booking, pricing configuration, and supported transformation rules.

#### Financial identity and tax relationships

Line-level identifiers are important for connecting:

* Revenue lines
* Tax allocations
* Booking components
* Payment or transaction records
* Related activity options

Customers should not infer these relationships from display names or identifier formatting.

Where historical records have incomplete line-level identity or passenger allocation data, the transformation may not be able to derive every accounting relationship reliably.

Such records should be reviewed through the supported exception or correction process rather than silently assigning financial values.

#### Accounting-date processing

A D365 transformation may be generated for a specified accounting date or reporting period.

The accounting date should be treated separately from:

* Booking creation date
* Activity travel date
* Payment processing date
* Export generation date

Customers should agree on the relevant accounting-date rules before production integration.

#### D365 transformation versioning

D365 transformation versions are independent of canonical DataBridge versions.

For example:

* Canonical schema: `2.0.0`
* D365 transformation: `1.5.0`

The transformation version determines the applicable output contract and mapping behavior.

Customers must verify that their D365 import mapping is compatible with the enabled transformation version.

### 3.5 Custom Transformations and Additional Layering

Some customers require a data structure or business rule that is not covered by the standard canonical datasets or available transformations.

Examples include:

* Custom finance-system mappings
* Xero or other accounting-platform exports
* Customer-specific Power BI reporting models
* Additional revenue classifications
* Custom tax treatments
* Specialized accounting codes
* Organization-specific financial dimensions
* Additional booking or offering attributes
* Custom aggregation and reconciliation logic
* Consolidation across multiple Zaui organizations
* Destination-specific CSV or structured output requirements

These requirements should be reviewed with **Zaui Connectivity**.

Connectivity will assess:

1. The destination system and intended integration.
2. The data fields required.
3. The canonical data already available.
4. The required transformation or enrichment.
5. Any limitations or missing source information.
6. Versioning and compatibility requirements.
7. The appropriate implementation and validation approach.

Custom transformations are not automatically included with every DataBridge installation.

Availability, development scope, delivery arrangements, and any commercial requirements must be confirmed separately.

**New customers seeking custom layering should contact Zaui Connectivity before beginning their integration.**

### 3.6 Choosing the Right Integration

| Requirement                                   | Recommended approach             |
| --------------------------------------------- | -------------------------------- |
| Full standardized Zaui booking data           | Canonical DataBridge             |
| Customer-managed warehouse or ETL             | Canonical DataBridge             |
| Standard Power BI reporting input             | Power BI transformation          |
| D365 financial integration                    | D365 transformation              |
| Customer-specific accounting mappings         | Connectivity review              |
| Custom CRM or finance-platform output         | Connectivity review              |
| Historical imported booking population        | Coordinated baseline or backfill |
| Real-time booking notifications               | Separate integration approach    |
| Additional fields not in the canonical schema | Connectivity review              |

***

## 4. Processing Rules

### Bootstrap vs. Daily Packages

A bootstrap establishes the initial state of the destination.

It contains the current-state reference dimensions required to begin processing the canonical export.

A daily package contains bookings changed during the export period, their complete current booking child sets, and the supporting reference records required to interpret those changes.

Process the bootstrap before daily packages.

**Bootstrap should not be confused with a complete historical backfill.**

If an organization needs imported or historical bookings beyond the configured bootstrap scope, that requirement must be reviewed separately.

### Dimension Records

The following datasets use referential closure:

* `customers.csv`
* `offerings.csv`
* `price_codes.csv`
* `channels.csv`

On bootstrap, they contain their full current-state dimensions.

On daily packages, they contain the rows required to resolve references from the booking data changed in that package.

Example:

`booking_items.channelId = 42`

↓

`channels.csv` includes `channelId = 42`

The absence of a dimension record from a daily package does not mean it was deleted.

`organization.csv` remains a single-row current-state snapshot.

`agents.csv` follows its documented employee-agent export behavior and does not use the same daily referential-closure model.

### Stable-Key Upserts

Use stable identifiers when loading reference and booking-header datasets.

For example:

`bookings.csv key = bookingId`

If booking `12345` already exists and appears in a subsequent package, update the existing booking.

Do not append another independent booking.

Apply the same principle to organizations, customers, offerings, price codes, channels, and agents.

### Booking Child Records

The following datasets represent complete current child sets for each emitted booking:

* `booking_items.csv`
* `taxes.csv`
* `booking_transactions.csv`

When an emitted booking changes, replace its previously stored child sets with the records contained in the new package.

Conceptually:

```
BEGIN TRANSACTION

UPSERT booking

DELETE existing booking_items
INSERT current booking_items

DELETE existing taxes
INSERT current taxes

DELETE existing booking_transactions
INSERT current booking_transactions

COMMIT
```

This prevents stale child records from remaining after booking modifications.

#### Cancelled and removed items

A cancelled booking item may remain in the export with:

`itemStatus = cancelled`

An item previously stored but absent from the new complete child set has been removed.

Do not treat cancellation and removal as the same operation.

#### Legacy booking items

Some historical records may have null or incomplete line-level identifiers.

When a booking with such records changes, rebuild its complete child set rather than attempting to match individual null-ID rows.

Do not invent source-system business identifiers to compensate for missing data.

Where destination-specific financial relationships cannot be established, use the appropriate exception and reconciliation process.

### Historical Baselines and Backfills

Historical data requires particular care.

A normal incremental export is intended to communicate changes during its export period.

It is not necessarily a complete record of all historical bookings in the Zaui organization.

A historical baseline or backfill may be used to establish an agreed historical population.

Where provided, the historical process should identify:

* The scope of included records
* The applicable schema or transformation version
* The historical period
* Package or output identifiers
* Validation and reconciliation results
* Any exceptions
* The transition to ordinary incremental processing

Historical baseline processing should be coordinated with Zaui.

Do not assume that a historical package belongs to the ordinary nightly cursor sequence.

Do not merge historical outputs into production without first confirming how duplicates, updates, and financial records should be reconciled.

### Corrections and Reprocessing

DataBridge packages are immutable once published.

A correction does not require modifying an already published ZIP file.

Where supported, corrected output may be published as a separate versioned correction or reprocessing artifact.

Such output should be handled as an explicitly identified correction, not as an ordinary new booking export.

Before applying a correction:

1. Identify the affected source records.
2. Confirm the target environment.
3. Verify the applicable schema and transformation version.
4. Validate the correction output.
5. Determine whether records should replace or update previously loaded destination data.
6. Reconcile the resulting financial or reporting values.
7. Record the correction as part of the ingestion audit trail.

Historical data should not be blindly regenerated using newer booking configuration if doing so could change original commercial or financial values.

A correction process must preserve the integrity of the original business transaction.

### Idempotency

Processing the same immutable package more than once must be safe.

Record at least:

* Package ID
* SHA-256 checksum
* Schema version
* Export type
* Export-period start and end
* Processing result
* Processed timestamp

If the same package has already been committed with the same package ID and checksum, treat it as already processed.

If the same package ID appears with a different checksum, stop processing and investigate.

For transformed outputs, maintain equivalent delivery and processing identifiers where provided.

### Cursor Handling

The cursor represents the last canonical package successfully committed to the destination.

Do not advance it when a package has only been:

* Discovered
* Downloaded
* Extracted
* Staged
* Partially loaded

Advance it only after the complete package has committed.

Package boundaries should be taken from the manifest.

Do not assume every reporting period is exactly 24 hours.

***

## 5. Versioning and Compatibility

DataBridge uses versioned contracts so that integrations can evolve without requiring customers to guess which schema or transformation rules apply.

There are two separate versioning concerns.

### 5.1 Canonical Schema Version

The canonical schema version identifies the structure and meaning of the standardized DataBridge datasets.

The original DataBridge guide documented schema version `1.1.0`.

Subsequent DataBridge development introduced the `2.0.0` canonical schema used with newer transformation workflows.

Customers must inspect the schema version advertised by their actual package or manifest.

**Do not assume every organization or historical package uses the same schema version.**

#### Semantic versioning

Version numbers follow the general format:

`MAJOR.MINOR.PATCH`

| Change | Example           | Meaning                                   |
| ------ | ----------------- | ----------------------------------------- |
| Major  | `1.x.x` → `2.x.x` | Potentially incompatible contract changes |
| Minor  | `1.0.0` → `1.1.0` | Backward-compatible additions             |
| Patch  | `1.1.0` → `1.1.1` | Compatible corrections or clarifications  |

Consumers should identify CSV fields by header name rather than column position.

An integration should reject unsupported major versions until compatibility has been validated.

### 5.2 Transformation Version

Transformations have their own version numbers.

For example:

| Layer                       | Example version |
| --------------------------- | --------------- |
| Canonical DataBridge schema | `2.0.0`         |
| Power BI transformation     | `1.3`           |
| D365 transformation         | `1.5.0`         |

These versions describe different contracts.

A canonical schema change does not automatically mean that every transformation must adopt the same version number.

Likewise, a transformation may receive corrections or mapping changes without changing the underlying canonical schema.

Customers should record both the canonical source version and transformation version where supplied.

### 5.3 Compatibility Responsibilities

Before upgrading a production integration:

1. Review the new version's documented changes.
2. Confirm the destination supports the output fields and types.
3. Check key and relationship changes.
4. Validate financial and tax mappings.
5. Confirm historical and incremental processing behavior.
6. Test with representative booking records.
7. Reconcile output against expected source values.
8. Approve the version before production ingestion.

Do not assume that a stable transformation URL removes the need for version testing.

### 5.4 Schema and Transformation Evolution

Future versions may introduce:

* Additional canonical datasets
* New fields
* Expanded financial attribution
* New transformation types
* Improved source-record relationships
* Additional reporting dimensions
* Destination-specific mapping enhancements

The availability of a field or feature depends on the supported schema and transformation version.

Customers requiring functionality not available in their current version should contact Zaui Connectivity.

***

## 6. Reference

### Package Validation

Before loading a canonical package, validate:

**Package**

* Package ID
* Supported schema version
* Expected byte size
* SHA-256 checksum

**Files**

* Filenames
* Dataset versions where provided
* File sizes
* File checksums
* Record counts

Process only the contents advertised by the manifest.

### CSV Data Types

DataBridge uses the following logical types:

| Type      | Format                                           |
| --------- | ------------------------------------------------ |
| String    | UTF-8 text                                       |
| ID        | Stable string identifier                         |
| Date      | `YYYY-MM-DD`                                     |
| Time      | `HH:MM:SS`                                       |
| Timestamp | ISO 8601 including applicable offset             |
| Integer   | Base-10 whole number                             |
| Decimal   | Base-10 decimal without currency symbol          |
| Boolean   | `true` or `false`                                |
| Enum      | Documented value supported by the schema version |

Time values represent organization-local wall-clock time unless otherwise documented.

### Null Values

An empty CSV field represents null when the field is nullable.

For example:

```
customerId,email,phone
12345,jane@example.com,
```

The empty phone value is null.

Do not automatically convert null values to:

* `0`
* `false`
* `UNKNOWN`
* `N/A`
* `REDACTED`

### Financial Data

Use exact decimal or fixed-point storage for financial values.

Prefer:

`DECIMAL / NUMERIC`

Rather than:

`FLOAT / DOUBLE`

Do not assume that:

* Every booking total can be reconstructed from descriptive dimensions.
* An amount's sign determines debit or credit direction.
* Duplicate tax names should be collapsed.
* Package grouping identifies a globally unique package sale.
* Price-code names reproduce Zaui pricing.
* A pricing option inherits the same tax treatment as its parent activity.
* Every historical record contains complete line-level identity or passenger allocation data.

Use the exported financial values as source values unless an explicitly documented reconciliation rule applies.

For accounting transformations, validate the relationship between revenue, tax, payments, and related booking lines before posting to the destination.

### Reconciliation and Exceptions

Financial and reporting integrations should include a reconciliation process.

Depending on the output type, this may include:

* Booking counts
* Revenue totals
* Tax totals
* Payment totals
* Source booking references
* Line-item identities
* Passenger allocations
* Accounting dates
* Exception counts
* Source-to-destination row mapping

Where a transformation reports an exception, the affected records should be reviewed before being imported into a financial destination.

An exception should not automatically prevent unrelated valid records from being processed if the supported transformation and destination workflow allow independent processing.

However, customers should not silently ignore unresolved financial exceptions.

The appropriate treatment depends on the destination and its reconciliation requirements.

### Personal Data

DataBridge may contain approved personal data relating to purchasers and guests.

Depending on configuration:

**Included**

Approved customer contact and address fields may be populated.

**Redacted**

Direct customer details are omitted while supported stable identifiers and relationships remain available.

The standard canonical export does not include sensitive information such as:

* Payment card details
* Authentication credentials
* Passwords or secrets
* Government identifiers
* Passport details
* Health information
* Birth dates
* Waiver data
* Unrestricted notes
* Person-level passenger records

Changing the personal-data setting affects future packages.

It does not automatically modify packages already generated, downloaded, or loaded into customer-controlled systems.

### Security

Treat DataBridge packages and transformed outputs as potentially containing personal or commercially sensitive information.

Consumers should:

* Use HTTPS.
* Restrict access using least privilege.
* Encrypt sensitive staging and destination storage at rest.
* Keep personal data out of application logs.
* Keep sensitive access information out of monitoring systems.
* Safely extract ZIP archives and prevent path traversal.
* Remove temporary staging files after processing.
* Apply appropriate downstream retention and privacy controls.
* Restrict access to financial and reporting outputs.

Downloaded DataBridge data becomes the responsibility of the organization operating the destination system.

### Retention

Standard DataBridge packages are retained for **30 days** under the documented canonical export policy.

Process required packages before they expire.

Do not use DataBridge package storage as a long-term archive.

If a required package expires before it has been processed, do not skip it and advance to a newer cursor.

Stop processing and contact Zaui.

Historical baselines, correction artifacts, and transformed outputs may follow different delivery or retention arrangements. Confirm these arrangements for the specific integration.

### Error Handling

A production integration should distinguish between:

* Retrieval failures
* Invalid or unavailable URLs
* Package checksum failures
* File validation failures
* Unsupported schema versions
* Cursor discontinuities
* Missing packages
* Destination ingestion failures
* Transformation compatibility errors
* Financial reconciliation exceptions

Do not manually advance the canonical cursor to bypass an ingestion problem.

For transformed outputs, do not treat an HTTP-successful download as proof that the financial or reporting data has passed destination validation.

### Monitoring

A production integration should record enough information to determine what happened to each export.

At minimum, record:

* Package or transformation run identifier
* Export type
* Export period
* Schema version
* Transformation version, where applicable
* Checksum, where supplied
* Download and validation results
* Source and loaded record counts
* Previous cursor
* Committed cursor
* Processing result
* Exceptions and errors
* Completion time

Alert when there is:

* Repeated retrieval failure
* Cursor discontinuity
* An expired required package
* Checksum or file validation failure
* Unsupported schema or transformation version
* Repeated destination failure
* Absence of an expected nightly export
* Unresolved financial reconciliation exceptions

### Data Not Included

The standard canonical DataBridge export does not provide:

* Real-time updates
* Individual passenger records or passenger personal details
* Payment card data
* Credentials or authentication secrets
* Standalone fee or discount datasets
* Comprehensive offering-category enrichment
* Detailed departure, destination, location, journey, route, stop, or vehicle data
* Customer-requested historical rebuilds as an automatic nightly feature
* Long-term package archive storage
* Every customer-specific finance or reporting field

Additional datasets or transformations may be introduced through future versioned releases.

Customers requiring additional fields or capabilities should contact Zaui Connectivity to assess whether they can be provided through a supported transformation or custom layering.

***

## 7. Production Checklist

Before enabling production ingestion, verify the following.

#### Canonical DataBridge

* DataBridge is installed and enabled.
* The DataBridge location supplied by the app is stored as configuration.
* The supported schema version is confirmed.
* Bootstrap is processed before daily packages.
* Historical baseline requirements are identified separately.
* The manifest is used to discover and validate packages.
* Package sizes and SHA-256 checksums are validated.
* ZIP extraction prevents path traversal.
* Unsupported schema versions fail before destination changes.
* CSV files are parsed using a standards-compliant parser.
* Stable-key datasets use idempotent upserts.
* Booking child sets are replaced atomically.
* Financial values use exact decimal storage.
* Cursor continuity is validated.
* The cursor advances only after a complete commit.
* Package IDs and checksums are recorded.
* Missing or expired packages stop processing.
* Personal data is protected.
* Operational monitoring detects failures.

#### Zaui-Managed Transformations

* The required destination transformation is identified.
* The transformation is enabled for the organization.
* The stable transformation URL is configured.
* The supported transformation version is confirmed.
* Destination-specific field mappings are reviewed.
* Historical baseline requirements are agreed.
* Representative booking and financial records are validated.
* Tax, revenue, and payment mappings reconcile.
* Exception-handling rules are established.
* The destination ingestion process is tested.
* Production enablement is approved.
* Monitoring is configured for delivery and ingestion failures.

#### Custom Transformations

* The destination system is identified.
* Required fields and mappings are documented.
* Any missing canonical data is identified.
* Custom calculations and business rules are defined.
* Zaui Connectivity has reviewed the requirements.
* Scope, compatibility, and delivery arrangements are confirmed.
* The custom output is validated before production use.

***

## 8. Integration Principles

A successful DataBridge integration should answer the following questions clearly.

#### What does DataBridge provide?

A standardized, versioned package of canonical Zaui datasets, with optional destination-specific transformation capabilities.

#### How do I retrieve the data?

For canonical exports, use the DataBridge location supplied by the app to discover and download the available packages.

For a Zaui-managed transformation, use the stable transformation URL supplied for your organization.

#### What do I open first?

For canonical exports, read the manifest. It describes the packages and files that should be processed.

For a transformation, retrieve the configured output and validate its applicable version and delivery metadata.

#### How are the canonical datasets related?

Join them using documented booking, line-item, customer, offering, price-code, channel, tax, and transaction identifiers.

Use explicit parent-child references for subordinate booking items.

#### What happens when the next nightly package arrives?

For canonical exports, validate cursor continuity, load or update the data, replace complete booking child sets, commit the package, and then advance the stored cursor.

For transformed outputs, retrieve the newly published output and apply the destination's documented ingestion and reconciliation rules.

#### What if I need historical data?

Historical baselines and backfills must be coordinated separately.

Do not assume ordinary incremental exports contain every historical booking.

#### What if I need Power BI or D365?

Review the supported Zaui-managed transformations.

These can provide destination-specific output without requiring the customer to build every canonical mapping independently.

#### What if my destination needs additional fields or custom mappings?

Contact **Zaui Connectivity**.

The team can assess whether the requirement can be supported through the canonical dataset, an existing transformation, or custom layering.

### Summary

**Canonical DataBridge**

Discover package\
↓\
Read manifest\
↓\
Validate files\
↓\
Load canonical datasets\
↓\
Join / Upsert\
↓\
Commit cursor\
↓\
Transform for destination\
↓\
Repeat with next nightly package

**Zaui-Managed Transformation**

Enable supported transformation\
↓\
Receive stable transformation URL\
↓\
Retrieve latest published output\
↓\
Validate version and data\
↓\
Load into Power BI / D365 / Supported destination\
↓\
Reconcile and monitor\
↓\
Repeat according to delivery schedule

**The core integration principles are:**

1. Treat the manifest as the canonical export contract.
2. Treat each published package as an immutable unit of work.
3. Treat the committed cursor as the source of truth for canonical ingestion progress.
4. Treat canonical schema versions and transformation versions as separate contracts.
5. Use Zaui-provided URLs rather than constructing export paths.
6. Coordinate historical baselines, financial corrections, and custom mappings explicitly.
7. Contact Zaui Connectivity for additional transformation or layering requirements.

DataBridge provides the foundation for reliable Zaui data integration. Canonical exports give organizations flexibility to build their own data models, while supported transformation layers provide a more direct path to systems such as Power BI and Dynamics 365.
