Open Source Introduction of Target DVS EDI Project

Recently, in order to help users to better use the EDI system, we open source the mature EDI projects based on past project implementation experience. After the user installs the Zhixingzhiqiao EDI system, he only needs to download the sample code we have compiled and place it in the workspace designated by Zhixingzhiqiao to start using it.

Today's article mainly introduces the Target DVS EDI project, how to obtain the open source project code and how to deploy it to the Zhixingzhiqiao EDI system.

Introduction to Target DVS EDI & JSON Solution

The Target DVS EDI to JSON sample stream has pre-configured ports for converting the following transaction sets according to the EDI specification provided by Target DVS:

1. 850 Purchase Order, Target -> Supplier
2. 855 Order Reply, Supplier -> Target
3. 860 Purchase Order Change, Target -> Supplier
4. 855 Order Change Reply, Supplier -> Target
5. 856 Send Stock Notification, Supplier -> Target
6. 846 Inventory Report, Supplier -> Target
7. 864 Message Notification, Target -> Supplier
8. 997 Function Confirmation, Supplier <-> Target

It is a very common solution to realize the integration between the EDI system and the ERP system through JSON, which can effectively decouple the two systems, thereby improving the reliability and maintainability of the entire system.

Through the JSON method, the EDI system and the ERP system can respectively store the data to be transmitted in the form of JSON files in the specified path, and then the other system can obtain the JSON from the specified path for processing. This avoids directly modifying data in the other party's system, thereby reducing risks and errors during data transmission.

The following ports form the core elements of the workflow:

1. AS2 port: It is used for the function of secure transmission through the Internet network, and confirms the AS2 information of the Target DVS, such as AS2 ID, URL and public key certificate, so as to perform correct configuration.
2. X12 Port: Generate EDI files from XML or convert EDI files to XML for further processing.
3. XMLMap port: provide a visual way to convert XML data from one structure to another, and establish a mapping relationship from source files to template files.
4. Branch port: judge and match XML to distinguish files of different business types.
5. Notify Port: Send email notifications to specified recipients.
6. Script port: Use the ArcScript function supported by the underlying engine of the application program to perform various programmable operations, such as renaming.
7. JSON port: realize the mutual conversion between JSON file and XML file.

How to deploy the above workflow in the Zhixingzhiqiao EDI system?

ready to download and run

Target DVS EDI to Json

Use Json to generate a series of EDI documents to communicate with Target.

Download WorkflowDownload   Sample Files 

create workspace

To run the Zhixingzhiqiao EDI system, navigate to the Workflow tab and click the gear icon in the upper right corner. Select the Create Workspace option to create a new workspace Target_DVS for this example stream.

import workspace

From the gear drop-down menu on the right, click Import Workspace. In the dialog that appears, select the downloaded sample flow Target_DVS.arcflow to import the relevant ports and settings. Or directly drag Target_DVS.arcflow to the designated workspace.

After successfully importing the sample workflow, you will see the complete workflow as shown in the image below:

After successfully importing the sample flow, you can start configuring the port to best suit your specific use case.

Perfect workflow configuration

Perfect workflow configuration

Navigate to the Settings tab for the Target_AS2 port. Configure Target's AS2 information according to the AS2 document provided by Target, such as Target's AS2 ID, trading partner URL, and trading partner certificate. After the configuration is complete, please navigate to the "Input" tab to upload the test file to test the AS2 connection with Target, and at the same time navigate to the "Output" tab to view the files sent by Target.

At the same time, you need to configure AS2 personal settings: supplier's AS2 ID, private key certificate, certificate password, and public key certificate.

Implement format conversion from X12 to database XML

The realization of file format conversion is mainly achieved through the X12 port and XMLMap port. The XMLMap port has already pre-configured the data mapping, and the user does not need to perform additional operations. In the X12 port, you need to fill in the real information of the user and Target under the setting tab, and configure the switching head:

Enter the test process

Taking the parsing direction (that is, receiving the EDI 850 purchase order from Target and converting it to get a custom JSON) as an example, the test process is as follows:

Upload test file

Navigate to the X12 port with port ID Target_X12ToXML and under the Input tab upload the previously downloaded sample file: 850.edi.

view JSON result

After the X12 port is issued, navigate to the JSON port whose port ID is Target_850_JSON, and under the output tab, you can see that the status of the 850 file just received is Success, and you can download the JSON to view the order data.

As shown below, this is the received JSON of a purchase order from Target.

 {
    "po_header": {
        "poType": "Dropship",
        "poNumber": "1000873599",
        "releaseNumber": "",
        "poDate": "20200429",
        "contractNumber": "9859",
        "orderNumber": "123456",
        "coverageCode": "36",
        "warehouseNumber": "M46D",
        "vendorNumber": "123456",
        "deliveryDateCode": "Non - Upgradeable",
        "estimatedShipDate": "20171219",
        "guestOrderDate": "20171231",
        "estimatedDeliveryDate": "20171222",
        "scacCode": "UPSN",
        "routingDescription": "NS",
        "serviceLevelCode": "G2",
        "orderDescription": "Thank you for your purchase. If you ordered additional items they will arrive separately.",
        "soldToName": "EDI Helpdesk",
        "additionalSoldToName": "",
        "soldToAddress": "7000 Target Parkway ",
        "soldToCityName": "Brooklyn Park",
        "soldToStateOrProvinceCode": "MN",
        "soldToPostalCode": "55445",
        "soldToCountryCode": "US",
        "soldToContactName": "",
        "soldToElectronicMailNumber": "",
        "soldToTelephoneNumber": "",
        "billToName": "Target.com Accounts Payable",
        "additionalBillToName": "",
        "billToAddress": "TNC 3110 PO Box 1296",
        "billToCityName": "Minneapolis",
        "billToStateOrProvinceCode": "MN",
        "billToPostalCode": "55440",
        "billToCountryCode": "US",
        "billToContactName": "",
        "billToElectronicMailNumber": "",
        "billToTelephoneNumber": "",
        "shipToName": "EDI Helpdesk",
        "additionalShipToName": "",
        "shipToAddress": "7000 Target Parkway ",
        "shipToCityName": "Brooklyn Park",
        "shipToStateOrProvinceCode": "MN",
        "shipToPostalCode": "55445",
        "shipToCountryCode": "US",
        "shipToContactName": "EDI Help Desk",
        "shipToElectronicMailNumber": "",
        "shipToTelephoneNumber": "612-304-3310",
        "po_detail": [
            {
                "lineNumber": "1",
                "quantityOrdered": "3",
                "measurementUnit": "Each",
                "unitPrice": "12.3",
                "unitPriceMeasurement": "Price per Each",
                "buyerCatalogNumber": "790-01-2022",
                "europeanArticleNumber": "",
                "eanNumber": "",
                "isbnNumber": "",
                "buyerItemNumber": "15013163",
                "stockKeepingUnit": "7680-02009152",
                "eanCaseCode": "",
                "eanShippingContainerCode": "",
                "upcConsumerPackageCode": "846186077111",
                "productDescription": "WR CARGO SHO 38 BLK SOLID",
                "messageText": "Mail In or Store",
                "wrappingMaterialDescription": "",
                "packingSlipDescription": "This item must be returned within 90 days of the ship date."
            },
            {
                "lineNumber": "2",
                "quantityOrdered": "1",
                "measurementUnit": "Each",
                "unitPrice": "4.33",
                "unitPriceMeasurement": "Price per Each",
                "buyerCatalogNumber": "390-32-0999",
                "europeanArticleNumber": "",
                "eanNumber": "",
                "isbnNumber": "",
                "buyerItemNumber": "13498855",
                "stockKeepingUnit": "783323323",
                "eanCaseCode": "",
                "eanShippingContainerCode": "",
                "upcConsumerPackageCode": "394949039444",
                "productDescription": "WR CARGO SHO 39 BLK SOLID",
                "messageText": "Mail In or Store",
                "wrappingMaterialDescription": "",
                "packingSlipDescription": "This item must be returned within 90 days of the ship date."
            }
        ]
    }}

Are you up and running?

If the answer is yes, then congratulations on successfully configuring the Target DVS EDI sample workflow!

read the original text

Guess you like

Origin blog.csdn.net/Cara_EDI_Consultant/article/details/131110233
Recommended