42Q-MES0170-A 42Q Xchange ERP APIs

From 42Q
Jump to navigation Jump to search

42Q Home > Tools > 42Q Xchange ERP APIs > 42Q Xchange ERP APIs

 

 

 

Tools
42Q Xchange ERP APIs
Version MES15.79
Revision C1
 
 
 

Introduction

The 42Q Xchange ERP APIs is a middleware pub/sub (publish-subscribe) solution that can be installed into the customer’s ERP system to seamlessly integrate with 42Q, ERP adapters, such as SAP, Oracle, and NetSuite. These adapters send and synchronize ERP work orders to 42Q, while 42Q passes back and automatically updates the ERP system with operation, resource, material, and serial / lot information. Shipment information is also passed to 42Q to close the loop for serial and sales order information within 42Q.
This ERP adapter is also capable of integrating the customer's Excel VBA Client, Customer Built Client, or Custom Built 42Q Adapters systems with 42Q and ERP.
The main advantages of integrating the 42Q Xchange ERP APIs are:

  • No need for duplication of effort in a customer's ERP system and 42Q.
  • Improving efficiency
  • Improving accuracy
  • Linking these systems together.

Note: Communication between 42Q and ERP systems is through work order management.
42Q Xchange ERP APIs offers:
 

  1. Work Order Creation: Sending work orders from ERP to 42Q. Work order creation sends work order header, routing, components, and custom attributes from ERP to 42Q. This also includes sending ATO type of work orders from ERP to 42Q. Work Orders are created based on unique requirements
  2. Work Order Update: Sending work order changes from ERP to 42Q. Changes can be on: Dates, Status, Quantities Increases, Route (Department/Operations), Components (Add/Remove/Supply type).
  3. WIP Moves/Material Issues: Sending Incremental Unit movements, Rework, Scrap, and Completion movement from 42Q to ERP. WIP Moves updates ERP with the latest progress of the product. Material Issue sends the material/component consumption transaction from 42Q to ERP, it includes the material consumed, serial/lot number, and quantity consumed.
  4. Ship Notification: Sending shipment information and serial information to 42Q after sales order shipment on ERP.

The below diagram illustrates how the 42Q Xchange ERP APIs work:

 

Figure 1: 42Q Xchange ERP APIs Integration

42QXEA 42Q Xchange ERP APIs Integration.png

 

42Q also contains a complimentary REST like API for customers with ERP systems not currently supported by the 42Q ERP Adapters; these 42Q Xchange APIs provide the same integration functionality as the 42Q ERP Adapters. Work Order and Shipment information can be sent directly to the 42Q Xchange API and WIP information from 42Q can be pulled from the 42Q Xchange API in a pub/sub type model.

Customers are able to create their own Clients and Adapters. In Figure 2, users can see a diagram of the recommended Customer Built Client Architecture.

 


Figure 2: Customer Built Client Architecture Diagram
42QXEA Customer Built Client Architecture Diagram.png

 

Supported Transactions

Figure 3: Supported Transactions Diagram

42QXEA Supported Transactions Diagram.png

 

42Q Xchange API Details

API Details:
Protocol: HTTPS
Encryption: Recommended TLS 1.3. Does support TLS 1.0 or greater.
Security: Basic Authorization
Content Type: application/json
HTTP Method: POST


API Base URL:
Prod: https://erpwaf.42-q.com
UAT: https://erpuatwaf.42-q.com


API Paths:
/erp/wo/create: Post a new Work Order to 42Q.
/erp/wo/update: Update an existing Work Order in 42Q.
/erp/wo/status: Retrieve the 42Q processing status of a Work Order /create or /update message sent.
/erp/wo/liveupdate: Live update of Work Order in 42Q.
/erp/order/shipment: Post Sales Order Shipment and Serial Information to 42Q.
/erp/wo/wip: Retrieve Work Order Operation Completions, Material Issues and Unit Completions from 42Q that are not marked as previously pulled.
/erp/wo/wip/period: Retrieve Work Order Operation Completions, Material Issues and Unit Completions from 42Q for a period of duration.
/erp/wo/notify: Retrieve ERP Notifications from 42Q that are not marked as previously pulled.
/erp/wo/notify/period: Retrieve ERP Notifications from 42Q for a period of duration.
 

A 42Q Xchange API Schema Definition is provided, this document details the data to be provided in the request payloads and expected responses. 

A 42Q Xchange API Swagger Definition is provided, this can be viewed in a swagger tool, such as https://editor.swagger.io, to get a more graphical/detailed description of the API.

 

Overview of 42Q Xchange Using Excel/LibreOffice

Create a 42Q Production Order from Excel/LibreOffice

 

In order to create a 42Q Production Order using a type of client, for example, Excel VBA, users must follow the next steps:

Note: The Excel/LibreOffice file will be provided by the 42Q team.

  1. Open the Excel file that contains the 42Q Production Order Creation Form.
  2. Enter all the required (*) information described in the form. Currently, form supports:

  1. Shop Order Header details (job number, part number, part description, quantity, etc).

Figure 4: Shop Order Header Details Table
42QXEA Shop Order Header Details Table.png

 


  1. Custom attributes at Work Order Level and Work Order Part Level.

Figure 5: Custom Attributes Table

42QXEA Custom Attributes Table.png

 


  1. Component Details.

Figure 6: Component Details Table

42QXEA Component Details Table.png

 


  1. Routing Details.

Figure 7: Routing Details Table

42QXEA Routing Details Table.png

Note: The Libre Calc. file only supports Header information for WO Create.

 


  1. Click the Send To 42Q button.

Note: The value for the field MESSAGE: ID can be whatever value the users want, and it is not necessary to be a unique value.

 

Figure 8: 42Q Production Order Creation Form

42QXEA 42Q Production Order Creation Form.png

 


  1. A new pop-up window will display, users must enter their password to submit the order.
  2. Click the OK button.
  3. A pop-up window will display to confirm to users that the work order creation request has been accepted, click the OK button to close it. The API call status will also show Success’ status.

 

Figure 9: Enter User’s Password

42QXEA Enter User’s Password.png

 

 

Figure 10: Response Window

42QXEA Response Window.png

 

Figure 11: API Response Message Recorded

42QXEA API Response Message Recorded.png

 

Note: Users can only create one production work order at a time, and it's not possible to create a production work order with the same job number.

 

 

Check Production Order Acknowledgement

When a work order is sent to 42Q, 42Q will send an acknowledgment transaction back. Users can check the acknowledgment message on Excel and LibreOffice macro files using the following steps:

  1. Open the Excel file with Get 42Q Production Order Create Ack.
  2. Provide the Job number with the correct message Id, org code, and customer code, then, select Get WO Ack status.
  3. A pop-up response message will display, containing the status and message of the work order acknowledgment.
  4. WO Creation status, API call status, and Ref message will be updated.

 

Figure 12: Get 42Q Production Order Create Ack

42QXEA Get 42Q Production Order Create Ack.png

 

Figure 13: Response

42QXEA Response.png

 

 

42Q Xchange ERP API Samples

https://erpuatwaf.42-q.com/erp/wo/create
Request:
{
    "MESSAGE_ID": "123e4567-e89b-12d3-a456-426614174000",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC",
    "JOB_NUMBER": "JL9f",
    "PART_DESCRIPTION": "42Q-MUG FINISHED GOOD",
    "ASSEMBLY_ITEM_NUMBER": "42Q-MUG",
    "QUANTITY": 6,
    "JOB_STATUS": "RELEASED"
}
Response:
{
    "STATUS": "Success",
    "MESSAGE": "WO Create Request Accepted.",
    "WO": [],
    "WIP": [],
    "REF": {
        "CUST": "123e4567-e89b-12d3-a456-426614174000",
        "42Q": 58,
        "API": "bd7ae623-3850-4985-ab1b-11e20cdecbc9",
        "ERR_CDE": 0,
        "ERR_MSG": "",
        "DATETIME": "2021-03-09T16:48:02.720Z"
    }
}

https://erpuatwaf.42-q.com/erp/wo/status
Request:
{
    "MESSAGE_ID": "123e4567-e89b-12d3-a456-426614174000",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC",
    "JOB_NUMBER": "JL9f"
}
Response:
{
    "STATUS": "Success",
    "MESSAGE": "7 - Received by 42Q",
    "WO": [],
    "WIP": [],
    "REF": {
        "CUST": "123e4567-e89b-12d3-a456-426614174000",
        "42Q": -1,
        "API": "8bbe3828-273c-484e-a157-059afbc11199",
        "ERR_CDE": 0,
        "ERR_MSG": "",
        "DATETIME": "2021-03-09T16:48:29.186Z"
    }
}
https://erpuatwaf.42-q.com/erp/wo/update
Request:
{
    "MESSAGE_ID": "123e4567-e89b-12d3-a456-426614174000",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC",
    "JOB_NUMBER": "JL9f",
    "PART_DESCRIPTION": "42Q-MUG FINISHED GOOD",
    "ASSEMBLY_ITEM_NUMBER": "42Q-MUG",
    "QUANTITY": 6,
    "JOB_STATUS": "RELEASED"
}
Response:
{
    "STATUS": "Success",
    "MESSAGE": "WO Update Request Accepted.",
    "WO": [],
    "WIP": [],
    "REF": {
        "CUST": "123e4567-e89b-12d3-a456-426614174000",
        "42Q": 58,
        "API": "bd7ae623-3850-4985-ab1b-11e20cdecbc9",
        "ERR_CDE": 0,
        "ERR_MSG": "",
        "DATETIME": "2021-03-09T16:48:02.720Z"
    }
}

https://erpuatwaf.42-q.com/erp/wo/liveupdate
Request:
{
    "MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC",
    "JOB_NUMBER": "JL9f",
    "QUANTITY": 5,
    "JOB_STATUS": "7"
}
Response:
{
    "STATUS": "Error",
    "MESSAGE": "false Job not released in MDS",
    "WO": [],
    "WIP": [],
    "REF": {
        "CUST": "43D03251548A5238E05366FAA4943E45",
        "42Q": 60,
        "API": "900b72f8-b923-4a9d-98c0-599a95932f35",
        "ERR_CDE": 1,
        "ERR_MSG": "Job cannot be changed",
        "DATETIME": "2021-03-09T16:52:37.489Z"
    }
}
https://erpuatwaf.42-q.com/erp/order/shipment
Request:
{
    "MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC",
    "SALES_ORDER": "SO0001",
    "CUST_PO_NUMBER": "PO0001",
    "SHIP_IDENTIFIER": "AIR0001-42Q",
    "SHIP_METHOD": "AIR",
    "SHIP_TO_LOCATION": "42Q",
    "SHIP_TO_ADDRESS1": "Plumeria Drive",
    "SHIP_TO_ADDRESS2": "Building 2",
    "SHIP_TO_CITY": "SAN JOSE",
    "SHIP_TO_STATE": "CA",
    "SHIP_TO_COUNTRY": "US",
    "SERIALS": [
        {
            "SERIAL": "SABC00001",
            "LINE_NUMBER": "x1"
        },
        {
            "SERIAL": "SABC00002",
            "LINE_NUMBER": "x2"
        }
    ]
}
Response:
{
    "STATUS": "Success",
    "MESSAGE": "Ship Notify Sent Successfully.",
    "WO": [],
    "WIP": [],
    "REF": {
        "CUST": "43D03251548A5238E05366FAA4943E45",
        "42Q": 59,
        "API": "1a9a582a-e057-4c45-8b12-a55fd42ed3a9",
        "ERR_CDE": 0,
        "ERR_MSG": "",
        "DATETIME": "2021-03-09T16:49:13.085Z"
    }
}


https://erpuatwaf.42-q.com/erp/wo/wip
Request:
{
    "MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC"
}
https://erpuatwaf.42-q.com/erp/wo/wip/period
Request:
{
    "MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
    "ORGANIZATION_CODE": "ORG1",
    "CUSTOMER_CODE": "GENERIC",
    "START_DATETIME": "2021-04-22",
    "END_DATETIME": "2021-04-23T10:23:22.22Z"
}
Response:
{
    "STATUS": "Success",
    "MESSAGE": "",
    "WO": [],
    "WIP": [
        {
            "JOB_NUMBER": "JL1",
            "TRANSACTION_ID": 13145,
            "MESSAGE_ID": "c4246601-00c8-4134-a90e-057973e39452",
            "DATE_TIME": "2020-10-30T15:20:02.886",
            "MOVES": [
                {
                    "QUANTITY": 1,
                    "FROM_SEQUENCE": 30,
                    "FROM_STEP": "In Queue",
                    "TO_SEQUENCE": 40,
                    "TO_STEP": "In Queue",
                    "SEQUENCE": 3,
                    "HANDS_ON_TIME": 4,
                    "PICKED": false
                },
                {
                    "QUANTITY": 2,
                    "FROM_SEQUENCE": 40,
                    "FROM_STEP": "In Queue",
                    "TO_SEQUENCE": 50,
                    "TO_STEP": "In Queue",
                    "SEQUENCE": 5,
                    "HANDS_ON_TIME": 6,
                    "PICKED": false
                }
            ],
            "COMPLETIONS": [
                {
                    "SERIAL_NUMBER": "2090308-001",
                    "MANUFACTURE_DATE": "2020-10-30T10:17:02.000-04:00",
                    "PICKED": false
                },
                {
                    "SERIAL_NUMBER": "2090308-002",
                    "MANUFACTURE_DATE": "2020-09-30T11:17:02.000-04:00",
                    "PICKED": false
                }
            ],
            "MTRL_MOVE": [
                {
                    "COMPONENT_ITEM": "42Q-SHEET1",
                    "OP_SEQUENCE": 0,
                    "SUB_INVENTORY": "test",
                    "SUB_LOCATOR": "test",
                    "QUANTITY": 1,
                    "TYPE": "ISSUE",
                    "PICKED": false,
                    "DETAILS": [
                        {
                            "LOT_NUMBER": null,
                            "LOT_QUANTITY": null,
                            "SERIAL_NUMBER": "INST900078",
                            "PARENT_SERIAL": "MUG000138"
                        },
                        {
                            "LOT_NUMBER": null,
                            "LOT_QUANTITY": null,
                            "SERIAL_NUMBER": "INST900078",
                            "PARENT_SERIAL": "MUG000138"
                        }
                    ]
                },
                {
                    "COMPONENT_ITEM": "42Q-INST",
                    "OP_SEQUENCE": 10,
                    "SUB_INVENTORY": "test",
                    "SUB_LOCATOR": "test",
                    "QUANTITY": 1,
                    "TYPE": "ISSUE",
                    "PICKED": false,
                    "DETAILS": [
                        {
                            "LOT_NUMBER": "1000",
                            "LOT_QUANTITY": 1,
                            "SERIAL_NUMBER": null,
                            "PARENT_SERIAL": null
                        }
                    ]
                }
            ]
        }
    ],
    "REF": {
        "CUST": "43D03251548A5238E05366FAA4943E45",
        "42Q": -1,
        "API": "f92a8889-3deb-42e5-b5c6-1e715163d80d",
        "ERR_CDE": 0,
        "ERR_MSG": "",
        "DATETIME": "2021-03-24T07:11:59.614-07:00"
    }
}

 

 

42Q Xchange API Schema Definition

The tables below represent the different types of schemas included in the 42Q Xchange API. Each table provides information about every single field/element name, data type, whether it is required or not, description, and one example.

 

Figure 14: Summary Schema
42QXEA Summary Schema.png

 

Figure 15: WOFullSchema

42QXEA WOFullSchema.png

 

Figure 16: WOStatusSchema

42QXEA WOStatusSchema.png

 

Figure 17: WIPSchema-NotifySchema

42QXEA WIPSchema-NotifySchema.png

 

Figure 18: WIPPeriodSchema-NotifyPeriodSchema

42QXEA WIPPeriodSchema-NotifyPeriodSchema.png

 

Figure 19: WOLiveUpateSchema

42QXEA WOLiveUpateSchema.png

 

Figure 20: ShipmentSchema

42QXEA ShipmentSchema.png

 

Figure 21: OutSchema

42QXEA OutSchema.png

 

Figure 22: WIPOutSchema

42QXEA WIPOutSchema.png

 

Figure 23: NotifyOutSchema

42QXEA NotifyOutSchema.png