Inbound events
The EAM system sends inbound extract events to Business Central through AIP. These events update financial and procurement data by creating or modifying general journal lines, purchase invoices, or purchase credit memos based on the information received in the payload. However, these documents are not posted.
Business Central processes the following inbound events:
- GL Extract Event
- Receipt Extract Event
GL Extract Event
Business Central processes the gl-extract-v1 inbound event (mapped to schema-only-gl-extract-v1) to create general journal lines in the journal batch defined on the EAM Setup page. Each event adds new lines to the same batch.
The system reads transaction details from the payload and creates journal lines based on the following field mappings:
| Field in Business Central | Payload value |
|---|---|
| Posting Date | The transaction date from the related accounting information. |
| Document Type | Blank |
| Document No. | The General Journal Document No. field value from the EAM Setup page. |
| External Document No. | The value is created by joining the transaction date and transaction time received from EAM. |
| Account Type | G/L Account (Default value) |
| Account No. | For inventory adjustment and issue transactions, the system uses the Stores_Account field value. For return transactions, the system uses the account defined on the EAM Setup page. |
| Bal. Account No. | For inventory adjustment transactions, the system uses the account defined on the EAM Setup page. For return transactions, the system uses the Stores_Account value. For issue transactions, the system uses the Accounting_child account. |
| Amount | The system uses the value in in_log_material[].in_log_accounting_child[].amount field as the amount for the journal line. |
Receipt Extract Event
Business Central processes the receipt-extract-v1 event sent from EAM through AIP using the schema-only-eam-receipt-extract-v1 definition. This event allows Business Central to create or update purchase invoices and purchase credit memos based on the receipt information in the payload.
Business Central uses the supplier_return_flag value in the payload to decide which document to create. A value of 0 creates or updates a purchase invoice, and a value of 1 creates or updates a purchase credit memo.
When the system receives a receipt extract payload, it determines whether to process a purchase invoice or a purchase credit memo. It then looks for an existing document that matches the vendor number, posting date, and calculated vendor invoice or credit memo number. If a matching document exists, the system adds new lines to it. If not, it creates a new document with the information from the payload.
The system reads transaction details from the payload and creates document lines based on the following field mappings:
| Field in Business Central | Payload value |
|---|---|
| Vendor No. | The vendor number sent from EAM. |
| Document Date | The transaction date sent from EAM. |
| Document No. | A combined value generated by the purchase order, release, and change order fields with hyphens (for example: PO-REL-CO). |
| Vendor Invoice No. | The value is created by joining the transaction date and transaction time received from EAM. |
| Type | G/L Account (Default value) |
| No. | The system uses the in_log_material[].in_log_accounting_child[].account field value. If it is not available, it falls back to stores_account. If both are empty, an error occurs. |
| Quantity | The quantity of the item received, expressed in packages. |
| Direct Unit Cost | The cost of a single unit of the item sent from EAM. |
| Description | A combined value created by adding the item number and description with a hyphen (for example: ITEM-DESCRIPTION). |
The logic and field mappings for purchase invoices and purchase credit memos are the same.