---
schema_version: "1"
id: 71da2ceb316edf39f408624b6658487c985308e9a9686944770bdd3c6f566969
title: Export the Transaction Log (TLog)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/retail-cloud/guides/export-tlog.md
canonical_url: https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-tlog.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 775838cc3a9d2068a195b4a7ae39b74c207949899257e3a6d6a162bebdb47a25
products:
  - Point of Sale for Developers
  - Salesforce APIs
---
# Export the Transaction Log (TLog)

Export transaction logs, also known as TLogs, from the Point of Sale app to transfer point-of-service information to external systems. You can use TLog exports to obtain the message set that contains transaction details. Review the available options to customize your TLog exports.

**Supported Transactions**

The TLog export supports these store transactions.

- In-store order
- Endless aisle order
- Return transaction
- Exchange transaction

**note:** Even Exchange, Exchange (customer pays), and Exchange (customer gets refund) transactions require more than one export file. Two files are exported for each scenario, New Sale and Return of Old Transaction.

**Export Options**

Point of Sale offers these TLog export options.

- Real time export
- Batch export
- Webhook integration

## Use Real Time Export

**important:** If using both SPI order export and TLog export, omit this step, as the Real Time Export toggle needs to be disabled. SPI order export is, by default, a real time export and the TLog export needs to be scheduled. If you aren't using both, continue reading.

With Real Time Export, the TLog export occurs automatically after each transaction is captured in the Point of Sale platform using SFTP.

Follow these steps to enable Real Time Export.

1. In the CMS, go to **Store Management** | **Store Settings** | **OMS**.

2. Turn on **Real Time Export**.![A screenshot shows the option for enabling the real time export.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-real-time-export-option.png)

3. To configure the SFTP endpoint, refer to [Order Export Configuration](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-tlog.html#order-export-configuration). Even though real time is enabled, it is strongly recommended to configure the [Use Batch Export](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-tlog.html#use-batch-export) daily at the end of the day.

For supported file format, refer to [Transaction Log Format](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-tlog.html#transaction-log-format).

## Use Batch Export

The batch export functionality performs the TLog export periodically via SFTP. Each export consists of the transactions that occurred since the last export job. The transaction can be sent according to the [Transaction Log Format](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-tlog.html#transaction-log-format). To enable batch export, refer to [Order Export Configuration](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/export-tlog.html#order-export-configuration).

## Use Webhook Integration

The webhook integration sends a Point of Sale `CustomerOrder` object as JSON to an external endpoint via HTTP POST. This event occurs synchronously at the end of order processing. Webhooks are triggered for these order lifecycle events.

1. New order creation
2. Partial or full order return
3. Order cancellation

**tip:** For a list of events Point of Sale can stream, refer to [Point of Sale Data Exports](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/data-exports.html).

To configure the Webhook endpoint CMS Store Settings:

1. In the CMS, go to **Store Management** | **Advanced** | **Store Settings**.

2. Configure the Real Time Order Export endpoint (OrderPostProcessingConfigJSON).

3. Configure the Real Time Returns Export endpoint (OrderReturnPostProcessingConfigJSON).![A screenshot shows the settings for webhook integration.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-webhook-integration-options.png)

## SFTP Configuration

The real time and batch exports are performed via SFTP with a single transaction per file.

### Transaction Log Format

These file formats are supported via SFTP:

<table>
<col />
<col />
<col />
<col />
<thead>
  <tr>
    <th>
    </th>
    <th>
      Single transaction per file
    </th>
    <th>
      Multiple transactions per file
    </th>
    <th>
      Additional Information
    </th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>
      POSLog (XML)
    </td>
    <td>
      Yes
    </td>
    <td>
      No
    </td>
    <td>
      Support for POSLog v6.0
    </td>
  </tr>
</tbody>
</table>

### Order & Item Level Attributes

For CSV and TSV TLog exports, field mappings must be configured. Otherwise, the order export job fails. By using field mappings, also customize the order and attributes at the item level in the CMS, including defining attribute names, setting attribute order, and applying data transformations as necessary.

1. In CMS, go to **Feeds** | **Field Mappings** | **Export Orders**.

2. Map the fields. As a guide, use [Define Export Orders Field Mappings](https://help.salesforce.com/s/articleView?id=commerce.rt_adv_config_data_feeds_maps_export_orders.htm&type=5) in _Salesforce Help_. ![A screenshot shows the mapping of attribute between order and item level](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-order-and-item-level-attributes-mapping.png)

3. Save your changes.

## Transaction File

A transaction can have multiple lines if it contains multiple products or tender types. For example, Order PS00021916 with two items, 100000 and 100582, purchased with two credit cards, Visa and MasterCard. In this case, the transaction has four lines in total.

![A screenshot shows an example of transaction file items.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-transaction-file.png)

## Order Export Configuration

A TLog export performed using SFTP is configured in CMS’s order export job. This configuration is required for both real time and batch exports using SFTP. This configuration allows you to select the listed following TLog attributes.

- TLog file format (POSLog or CSV or RetailNext)
- Brand's SFTP destination
- In the case of batch export, it is a batch interval.
- One transaction per file or more (not applicable for POSLog as it can send one transaction per file).

**note:** The max limit for running batch export is 1,000 per batch. To determine how frequently export jobs need to run, use calculate the total number of orders daily divided by 1,000.

### Configure SFTP for the first time

1.  Go to **Feeds** | **Export Jobs**.

2.  Click the Plus icon.![A screenshot shows the options for a new export job.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-to-configure-sftp-for-the-first-time-new-export-job-dialog.png)

3.  Click **Order**.![A screenshot shows a new order export job.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-to-configure-sftp-for-the-first-time-new-export-job.png)

### Edit an existing SFTP configuration

1.  Go to **Feeds** | **Export Jobs**.

2.  Hover over the Order card and click the Edit icon.
    ![A screenshot shows an example of a scheduled feed.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-feed-schedule.png)

**note:** For more information on configuring feed schedules, see [Schedule Feed Runs](https://developer.salesforce.com/docs/commerce/retail-cloud/guide/rt-adv-config-data-feeds-manage-schedule.html) in _Salesforce Help_.

## PS NRF POSLog/TLog (XML)

### NRF PosLog/TLog Overview

Point of Sale can export sale, return, and exchange transactions according to the NRF schema. The output is one XML file per transaction that brands can consume and ingest in their systems.

### PosLog/TLog Sectional Details

#### Identifying information

- Order ID - Whenever an item leaves the store, a new order ID is generated for sales or exchanges. Note that sales and exchanges have different order numbers in Adyen. For uneven exchanges (where the customer pays more), there's no refund reference in Adyen. Instead, the additional amount paid by the customer is recorded as a second Adyen transaction.

- Transaction ID - An order can have multiple transactions. In the case of exchanges, a single transaction ID spans across two orders.

- Receipt ID - POS generates a receipt ID for each transaction (Sale, Return, or Exchange). The receipt ID is generally printed on receipts only in fiscal countries and is present in POS Log export for reporting purposes in fiscal countries, such as Spain.

**note:** As part of the 8.9.1 build, TLogs include the transaction start (`transactionStartDate`) and end time (`transactionDate`). The recording time starts from when the cart is first created (when the first item is added to the cart) to when the order/transaction is completed (sales, returns, or exchange).

#### Locate file details

- The file begins with the store ID, order number, and associate ID.![A screenshot show store ID, order number, associate ID, and others at the top of the tlog.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-1.png)
- The end of the file includes the order date, order update date, and till ID.![A screenshot shows the order date, order, update, date, and till ID at the bottom of the tlog file.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-2.png)
- The `<LineItem>` tag includes the line item, product details, and sales attribution.![A screenshot showed the line item, product, details, and sale attribution under the line item tag.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-3.png)
- The `<LineItem>` tag also includes the tender, order level taxes, and delivery details, but with different types to distinguish the line items.![A screenshot shows the tender, order level tax, and delivery details under the line item tag, but with different types to distinguish the line items.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-4.png)
- The `<Customer>` tag includes the customer information.![A screenshot showing customer information under the customer tag.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-5.png)
- The `<TaxExemption>` tag (nested under the `<Tax>` tag) includes the reported tax exemptions.![A screenshot shows the tax exemptions reported under the tax exemption tag.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-6.png)

  **note:** TLogs and receipts don't record jurisdiction or registration number.

- The `IsExchange` field on the `<CustomerOrderTransaction>` tag specifies whether the transaction is for an item returned along with the purchase of another item.![A screenshot shows an exchange transaction returned with the purchase of another item.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-7.png)
- The `orderActivityLog` specifies all information about the history of an order, including the original transaction type files.![A screenshot shows order history and original transaction types under the order activity log.](https://developer.salesforce.com/docs/media/retail-cloud/rt-adv-config-export-tlog-poslog-tlog-sectional-details-8.png)

  - For exchanges, the `orderActivityLog` for the new order (that is, PS00000002) contains the following return information:

    - `returnProductList` - Returned products
    - `returnProductList.productTax` - Return item's tax
    - `returnProductPriceAdjustments` - Promotions/Discount/PriceOverride of returned items
    - `refundPaymentDetails` - Refunded payment, available only if the customer gets a refund during the exchange.
      **tip:** For more information, see [TLog Export FAQs](https://help.salesforce.com/s/articleView?id=commerce.rt_adv_config_export_tlog_export_faq.htm&type=5) in _Salesforce Help_.

- Format of `requestId` with `TENDER_REFERENCE_`:

  - Store and Forward (SAF) refers to orders with payments taken when the Adyen terminal operates in offline mode or experiences difficulties interacting with their platform. During SAF payments, Adyen does not generate the typical `requestID` (PSP reference) since the terminal is offline. Instead, the Point of Sale app uses `TENDER_REFERENCE_<AlternateRequestID>` as the request ID and includes it in TLogs.
  - The `AlternateRequestID` is generated by the Adyen terminal and serves as a means to track and reconcile payments, accessible through the Adyen Portal.
  - Subsequently, Point of Sale updates the `requestID` (PSP reference) field from `TENDER_REFERENCE_<AlternateRequestID>` to the actual PSP reference. This update occurs when Adyen initiates a callback after the SAF payment has been successfully synchronized with the Adyen platform. At that point, TLogs are sent out.
  - Point of Sale re-exports the order once the backend receives the Adyen callback with the actual `requestID` (PSP reference). Because this can result in two identical payloads for a single order, configure your system for updates or ignore the second callback.

- Custom string attributes, mapped in the product feed and configured in the CMS under the `tLogCustomProductAttributes` setting, are included in the order JSON. Custom string attributes must use camel case (for example, `customString1`). These attributes appear in the following product arrays:

  - `productList`
  - `orderProductList`
  - `returnProductList`
  - `orderactivity.transactionData.returnProductList`
  - `orderactivity.transactionData.productList`

### Example Files

- [CheckoutOrder.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/CheckoutOrder.xml)
- [CheckoutPromotion.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/CheckoutPromotion.xml)
- [ExchangeChargeMore.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/ExchangeChargeMore.xml)
- [ExchangeEven.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/ExchangeEven.xml)
- [ExchangeRefundDue.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/ExchangeRefundDue.xml)
- [FullReturn.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/FullReturn.xml)
- [PartialReturn.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/PartialReturn.xml)
- [PriceOverride.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/PriceOverride.xml)
- [TransactionDiscount.xml](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/TransactionDiscount.xml)
