Business Integration Solutions Documentation
Walkthrough: EDI Contract Between Two Companies
About this walkthrough
This walkthrough provides an overview on how to establish EDI connection between two companies.
Prerequisites
Template | Description | Type | Company |
---|---|---|---|
TI_EDI_1.PO.OUT | STAEDEAN Template-Export Purchase Order | Outbound | CRONUS Sales |
TI_EDI_2.SO.IN | STAEDEAN Template-Import Sales Order | Inbound | CRONUS International Ltd. |
TI_EDI_3.CONF.OUT | STAEDEAN Template-Export Order Confirmation | Outbound | CRONUS International Ltd. |
TI_EDI_4.CONF.IN | STAEDEAN Template-Import Order Confirmation | Inbound | CRONUS Sales |
TI_EDI_5.SHIP.OUT | STAEDEAN Template-Export Posted Sales Shipment | Outbound | CRONUS International Ltd. |
TI_EDI_6.SHIP.IN | STAEDEAN Template-Import Shipment | Inbound | CRONUS Sales |
TI_EDI_7.INV.OUT | STAEDEAN Template-Export Posted Sales Invoice | Outbound | CRONUS International Ltd. |
TI_EDI_8.INV.IN | STAEDEAN Template-Import Invoice | Inbound | CRONUS Sales |
- You can choose to create two companies for demonstration purpose. The templates for EDI Studio can be used for an intercompany integration between:
- A Sales Company [CRONUS Sales]
- A HQ Company [CRONUS International Ltd.]
- Import the EDI configuration packages from the TI.Templates folder in software package into respective companies as mentioned in the overview section.
- Make sure that the user has necessary read and write permissions to the folder which is being used for the File Writer and File Reader Endpoints.
- For demonstration purpose, we have created certain custom connectors. You can import TI_EDI_Demo.fob objects containing custom codeunits, available in the Sample.Files folder in software release package. These objects are NOT provided with the standard installation and is strictly for demonstration purpose only. You can create and use custom connectors catering to your needs. For more information on how to create custom connectors, please refer to the Software Development Kit (SDK.pdf) available in the software release package.
- A new vendor must be created for the HQ Company.
- A new customer must be created for the Sales Company.
An EDI Contract is created between these two companies as shown in the image below:
Template 1: Purchase Order Export
Story
- This connection uses the Record Change Event and is linked to an internal document with only one field, the Status field of the Purchase Header table.
- The filter is set to Released. This means, that when a Purchase Order is released, the Pipeline gets triggered.
- The Connection contains a Splitter Activity, which results in one message for each posted Purchase Order. The XML-files are exported by the File Writer Endpoint.
- Two documents are used in this connection:
- TI_EDI1_PO.TRIG is used for triggering purpose, i.e. the Record Change Event will detect modification based on the table and field structure specified in this document.
- TI_EDI1_PO.INT is used to generate a filtered set of data, used by XML Generator and Splitter.
Setup
- Select the CRONUS Sales company.
- Import the EDI Connection-TI_EDI_1.PO.OUT.zip configuration package.
- Open the TI_EDI_1.PO.OUT connection.
- Edit RECORDCHANGEEVENT and specify the following fields.
- Edit XMLGENERATOR and specify the following fields
- Edit SPLITTER and specify the following fields
- Edit FILEWRITER and specify the following fields
- Run the Check Configuration action to see if the connection is configured properly.
- Publish the connection (optional for demo purpose). Follow the steps in the wizard to complete the publication.
- Refresh or restart Business Central client.
Process
- Create two new purchase orders, say for vendor 10000 London Postmaster and 20000 AR Day Property Management.
- Release both Purchase Orders.
- Process the connection.
Result
For each Released Purchase Order, an XML-file is created and available on the specified location.
Template 2: Sales Order Import
Story
- This Connection uses the File Reader Endpoint to read the Purchase Order (in XML-format) from the file system.
- The Purchase Order XML-file has to be imported as a Sales Order, so it does not compare to the NAV table structures for the Sales Header table.
- A Mapper Activity is used to map the External (Source) document and the Internal (Target) document.
- The Record Generator Activity creates records and updates the NAV tables.
- Two documents are used in this connection:
- TI_EDI2_SO.EXT corresponds to the external document which is being read.
- TI_EDI2_SO_INT corresponds to the internal NAV table structure specifying how the records will be stored.
Setup
- Select the CRONUS International Ltd. company.
- Import the EDI Connection-TI_EDI_2.SO.IN.zip configuration package.
- Open the TI_EDI_2.SO.IN connection.
- Edit FILEREADER and specify the following fields.
- Edit MAPPER and specify the following fields.
6. Edit RECORDGENERATOR and specify the following fields.
Process
- Process the connection.
- If processed successfully, check Message Entries for results.
Result
A new Sales Order is created and available at the Sales Header table. The Message Entries table shows you which Sales Order is created. Use the Transaction Log to see more details for each import.
Template 3: Order Confirmation Out
Story
- The Sales Order is imported with the status Open.
- After the Sales Manager confirms (or changes) the Planned Shipment Dates, he will set the status to Released.
- This is the trigger for this EDI Connection. Based on a Record Change Event, a new Export is created.
- Two documents are used in this connection:
- TI_EDI3_SO.TRIG is used for triggering purpose, i.e. the Record Change Event will detect modification based on the table and field structure specified in this document.
- TI_EDI3_SO.INT is used to generate a filtered set of data, used by XML Generator and Splitter.
Setup
Select the CRONUS International Ltd. company.
Import the EDI Connection-TI_EDI_3.CONF.OUT.zip configuration package.
Open the TI_EDI_3.CONF.OUT connection.
Edit RECORDCHANGEEVENT and specify the following fields Edit XMLGENERATOR and specify the following fields.
- Edit XMLGENERATOR and specify the following fields. ![EDI Templ3 Settings2](Images/DM_EDI_Tmpl3_Setting2.png)
Edit SPLITTER and specify the following fields.
Edit FILEWRITER and specify the following fields.
Run the Check Configuration action to see if the connection is configured properly.
Publish the connection (optional for demo purpose). Follow the steps in the wizard to complete the publication.
Refresh or restart Business Central client.
Process
- Release the Sales Orders imported previously.
- Process the connection.
Result
For each Released Sales Order, an XML-file is created and available on the specified location.
Template 4: Order Confirmation In
Story
- This Connection uses the File Reader Endpoint to read the Order Confirmation (in XML-format) from the file system.
- The Sales Order Confirmation does not compare to the NAV table structures for the Purchase Header table.
- A Mapper Activity is used to map the External (Source) document and the Internal (Target) document.
- The Record Generator Activity creates records and updates the NAV tables.
- After importing the Order Confirmation, the External Document No. is updated on the Purchase Header.
- Two documents are used in this connection:
- TI_EDI4_SO.EXT corresponds to the external document which is being read.
- TI_EDI4_SO.INT corresponds to the internal NAV table structure specifying how the records will be stored.
Setup
- Select the CRONUS Sales company.
- Import the EDI Connection-TI_EDI_4.CONF.IN.zip configuration package.
- Open the TI_EDI_4.CONF.IN connection.
- Edit FILEREADER and specify the following fields.
- Edit MAPPER and specify the following fields.
- Edit RECORDGENERATOR and specify the following fields.
- Edit EVENTGENERATOR and specify the following fields.
Process
- Process the connection.
- If processed successfully, check Message Entries for results.
Result
The Purchase Order is now updated with the External Document No. field. Use the Transaction Log to see more details for each import.
Template 5: Shipment Out
Use this connection to export Shipment from the CRONUS International Ltd.
Story
- After the Sales Manager Posts (by pressing Post, select Ship, NOT Invoice or Ship and Invoice, press Ok) a Posted Sales Shipment is created for this Sales Order.
- This is the trigger for this EDI Connection. Based on a Record Change Event, a new Export is created.
- The TI_EDI5_SHIP.INT document is used to trigger the pipeline and also to generate filter set of data for XML Generator and Splitter.
Setup
- Select the CRONUS International Ltd. company.
- Import the EDI Connection-TI_EDI_5.SHIP.OUT.zip configuration package.
- Open the TI_EDI_5.SHIP.OUT connection.
- Edit RECORDCHANGEEVENT and specify the following fields.
- Edit XMLGENERATOR and specify the following fields.
- Edit SPLITTER and specify the following fields.
- Edit FILEWRITER and specify the following fields.
- Refresh or restart Business Central client.
Process
- Open a Released Sales Order, define the Quantity to Ship field on the Sales Line.
- Post Shipment.
- Process the connection.
Result
For each Shipped Sales Order, an XML-file is created (based on the Posted Sales Shipment) and available on the specified location.
Template 6: Shipment In
Use this connection to import Shipment into the CRONUS Sales.
Story
- This Connection uses the File Reader Endpoint to read the Posted Sales Shipment (in XML-format) from the file system.
- The Posted Sales Shipment does not compare to the NAV table structures for the Purchase Header table.
- A Mapper Activity is used to map the External (Source) document and the Internal (Target) document.
- The Record Generator Activity creates records and updates the NAV tables.
- After importing the Posted Sales Shipment, the Quantity to Receive and the Vendor Shipment No. are updated in the Purchase Order.
- Two documents are used in this connection:
- TI_EDI6_SHIP.EXT corresponds to the external document which is being read.
- TI_EDI6_SHIP.INT corresponds to the internal NAV table structure specifying how the records will be stored.
Setup
- Select the CRONUS Sales company.
- Import the EDI Connection-TI_EDI_6.SHIP.IN.zip configuration package.
- Open the TI_EDI_6.SHIP.IN connection.
- Edit FILEREADER and specify the following fields.
- Edit MAPPER and specify the following fields.
- Edit RECORDGENERATOR and specify the following fields.
- Edit EVENTGENERATOR and specify the following fields.
Process
- Process the connection.
- If processed successfully, check Message Entries for results.
Result
The Purchase Order is now updated with the Quantity to Receive and the Vendor Shipment No. fields. Use the Transaction Log to see more details for each import.
Template 7: Invoice Out
Use this connection to export Invoice from the CRONUS International Ltd.
Story
- The Sales Order is now ready to be invoiced.
- After the Sales Manager Posts an invoice, a Posted Sales Invoice is created for the Sales Order. This is the trigger for this EDI Connection.Based on a Record Change Event, a new Export is created.
- The TI_EDI7_INV.INT document is used to trigger the pipeline and also to generate filter set of data for XML Generator and Splitter.
Setup
- Select the CRONUS International Ltd. company.
- Import the EDI Connection-TI_EDI_7.INV.OUT.zip configuration package.
- Open the TI_EDI_7.INV.OUT connection.
- Edit RECORDCHANGEEVENT and specify the following fields.
- Edit XMLGENERATOR and specify the following fields.
- Edit SPLITTER and specify the following fields.
- Edit FILEWRITER and specify the following fields.
- Refresh or restart Business Central client.
Process
- Open a Released Sales Order, define the Quantity to Invoice field on the Sales Line.
- Post Invoice.
- Process the connection.
Result
For each Invoiced Sales Order, an XML-file is created (based on the Posted Sales Invoice) and available on the specified location.
Template 8: Invoice In
Use this connection to import Invoice into the CRONUS Sales.
Story
- This Connection uses the File Reader Endpoint to read the Posted Sales Invoice (in XML-format) from the file system.
- The Posted Sales Invoice does not compare to the NAV table Structures for the Purchase Header table.
- A Mapper Activity is used to map the External (Source) document and the Internal (Target) document.
- The Record Generator Activity creates records and updates the NAV tables.
- After importing the Posted Sales Invoice, the Quantity to Invoice and the Vendor Invoice No. are updated on the Purchase Order Card.
- Two documents are used in this connection:
- TI_EDI8_INV.EXT corresponds to the external document which is being read.
- TI_EDI8_INV.INT corresponds to the internal NAV table structure specifying how the records will be stored.
Setup
- Select the CRONUS Sales company.
- Import the EDI Connection-TI_EDI_8.INV.IN.zip configuration package.
- Open the TI_EDI_8.INV.IN connection.
- Edit FILEREADER and specify the following fields.
- Edit MAPPER and specify the following fields.
- Edit RECORDGENERATOR and specify the following fields.
- Edit EVENTGENERATOR and specify the following fields.
Process
- Process the connection.
- If processed successfully, check Message Entries for results.
Result
The Purchase Order is now updated with the Quantity to Invoice and the Vendor Invoice No. fields. Use the Transaction Log to see more details for each import.