--- title: "Report data import success or failure to the source" slug: "report-data-import-success-or-failure-to-the-source" description: "Learn how to report import status from external databases or files in D365 F&SCM, ensuring accurate data synchronization and error handling." tags: ["Concept topic"] updated: 2026-10-01T09:41:30Z published: 2026-10-01T09:41:30Z canonical: "docs.staedean.com/report-data-import-success-or-failure-to-the-source" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Report data import success or failure to the source When you import data, it can be required to report the success or failure of the import to the source. You report the import status to the source in several ways. Which way to choose, depends on the import scenario: - Import from an external database. - Import from file. ## Import from external database You can import data from an external database. If the root record of the external database has a field that represents the record status, you can report the import status to the external database. To report a status to the source on import from an external database, you need a: - Source - Target - Message ### Source The source document must be of type **ODBC** and the source connector must be of type **Database**. The source document records must be in line with how the data is structured and named in the external database. On the source document, make sure the record status field of the external database is added to the root record. ### Target The target document must be an internal document and the source connector must be of type D365 F&SCM. ### Message On the message header, define the **Update source status** settings: - **Status field** field, indicate which of the root record fields represents the record status. - **Processed status** field, enter the status that is assigned to the external database record if the message is successfully processed. Make sure, the processed status exactly matches the related status in the external database. - **Error status** field, enter the status that is assigned to the external database record if errors occurred on processing the message. Make sure, the error status exactly matches the related status in the external database. Example: ![Update source status with processed and error status options displayed clearly.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_StatusSettingsODBC.png) ## Import from file You can import data from files. To do so, the source document must be an external file-based document and the source connector must be a **Windows folder** connector. If you import data from a file, you can report the import status to the source using a file. So, you need a message to import the data and a message to report the import status to the external source. For example, import an item from an external system and report the import status to the external system. ## Import item To import, for example, an item, you need a: - Source document - Target document - Message ### Source document The source document is an external file-based document with the records and fields that define the item data in the file. ### Target document The target document is a D365 F&SCM document with the records and fields to import the item data into D365 F&SCM. ### Message The message maps the records and fields of the source document and target document. In the example, this message is called 'Import item'. On the message header, define these history settings: ![Settings for transaction history type and storage options in a user interface.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_HistorySettings.png) ## Export status To export the status of the import, for example an item import, you need a: - Source document - Target document - Message - Data synchronization ### Source document To the source document, add these records: - **BisHistory** with these settings: - **Fields**: ![Interface displaying BisHistory record fields including RecId, Status, and Name.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_SourceDoc_BisHistory.png) - **Range**: Add these ranges: - **Name**: [import message name]. So, only the history for that message is considered. - **Status**: Finished,HasError. So, only the fully processed history records are considered. **Example:** ![Table displaying record fields, range types, and values for data import status.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_BisHistoryRanges.png) - **BisHistoryEntity** with these settings: - **Fields**: ![Record management interface displaying fields for BisHistoryEntity and related records.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_SourceDoc_BisHistoryEntity.png) - **Relation**: ![Table showing relations between record fields and parent fields in a database.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_Relation2.png) - **BisBufferTable** with these settings: - **Fields**: ![Record details showing BisBufferTable and its associated fields in a database interface.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_SourceDoc_BisBufferTable.png) - **Relation**: ![Table showing relations between record fields and parent fields in a database.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_Relation2.png) ### Target document To the target document, add a record to define the item status in the file. **Example:** ![Interface displaying item status and fields in a record table format.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_TargetDoc.png) ### Message On the message, map record '**ItemStatus**' to '**BisBufferTable**', and map these fields: ![Mapping interface showing target and source records with field mapping details.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_MessageMapping.png) For the 'status' fields, select the **Constant** check box and fill in the **Constant name** with the success or error status name of the external system. For example: '**OK**' and '**Error**'. To each status field, add a field condition: - '**OK**' status field: ![Field mapping settings showing conditions, source, field, and processed value options.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_ConditionOK.png) - '**Error**' status field: ![Field mapping settings showing conditions and values for entity status errors.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_ConditionError.png) ### Data synchronization On the message header, set up this data synchronization and create the SQL trigger if it does not exist: ![Setup screen for data synchronization with highlighted update option for BisHistory record.](https://cdn.document360.io/da662430-6a41-47b1-8c7e-7e4ac37a9756/Images/Documentation/ExportStatus_DataSync.png) ## Related - [Set up record mapping](/set-up-record-mapping-flow.md) - [Set up field mapping](/set-up-field-mapping-flow.md) - [Set up message](/set-up-message.md)