Receive Messages from an ERP System

Before you begin

Set up ERP integration.

Procedure

Send a message to the ERP Integration database in the format specified in the following table:
Message Type Message Format
Message containing a work order
INSERT INTO erp.erp_integration_inbound_messages (Inserted_Date, Message_Type, Media_Type, Message, Inserted_By)
VALUES (GETUTCDATE(),'workOrder', 'application/json', '{WOID}', '<username>')
where {WOID} is a JSON document that specifies the work order. For a sample WOID, refer to JSON Work Order Import Document (WOID).
Message containing a process order
INSERT INTO erp_integration_inbound_messages (Inserted_Date, Message_Type, Media_Type, Message, Inserted_By)
VALUES (GETUTCDATE(),'processOrder', 'application/json', '{POID}', '<username>')
where {POID} is a JSON document that specifies the process order. For a sample POID, refer to JSON Process Order Import Document (POID).
Message containing a material
INSERT INTO erp_integration_inbound_messages (Inserted_Date, Message_Type, Media_Type, Message, Inserted_By)
VALUES (GETUTCDATE(),'material', 'application/json', '{MMID}', '<username>')
where {MMID} is a JSON document that specifies the material. For a sample MMID, refer to JSON Material Master Import Document (MMID).
Message containing a material lot
INSERT INTO erp_integration_inbound_messages (Inserted_Date, Message_Type, Media_Type, Message, Inserted_By)
VALUES (GETUTCDATE(),'materialLot' , 'application/json', '{MLID}', '<username>')
where {MLID} is a JSON document that specifies the material lot.

Sometimes, an MLID includes receiver data (represented by "description": "Receiver" in the MLID). The material lot that contains receiver data is considered a receiver. All the remaining material lots in a message are linked to the receiver using genealogy. You can perform inspection on receivers using the Receiving Inspection application in Plant Applications Web Client. However, it is not mandatory to include a receiver in a message.

For a sample MLID, refer to JSON Material Lot Import Document (MLID).
Message containing outside processing
INSERT INTO erp_integration_inbound_messages (Inserted_Date, Message_Type, Media_Type, Message, Inserted_By)
VALUES (GETUTCDATE(),’OSP’, 'application/json', '{MLID}', '<username>')
where {MLID} is a JSON document that specifies the OSP. For a sample MLID that contains an OSP, refer to JSON Outside Processing Master Import Document.
Tip:
Records are created in Plant Applications based on the message you have sent.