Get and Post the Components Consumed to Fulfill Work Orders
You can use a REST API to issue components for a work order operation. To get work order details, you can use a REST API to scan the serial of an assembly, and then post a material transaction for the components that Oracle Manufacturing Cloud issues for the work order operation.
Let's discuss these scenarios:
-
Get work order details according to assembly serial.
-
Get the components list for the work order operation.
-
Post the material transaction for the work order operation.
Get Work Order Details According to Assembly Serial
Assume you create a solution that allows John Brown, a discrete manufacturer, to use a mobile client to connect to your partner application, and then use a REST API. John uses the partner application to scan the serial of assembly PRE5712, and then uses the dispatchListWorkOrderOperations resource to get the details of the serial.
Here's a typical application processing flow for the scenarios:
-
Send a REST request to get work order details for assembly serial PRE5712.
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts the values for the following attributes from the response payload, and then displays them in the client.
Attribute
Description
ItemNumber
Value that uniquely identifies the Assembly Number. For example, MI-1234.
ItemDescription
Text description of the Assembly. For example, 5.5" mobile.
WorkOrderNumber
Number that identifies the work order. For example, M1-1208.
OperationSequenceNumber
Number that identifies the work order operation. For example, 20.
WorkCenterCode
Code that uniquely identifies the work center. For example, YLX_WC_02.
DispatchState
Dispatch state of the assembly. For example, READY.
Example URL
Use this resource URL format.
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/dispatchListWorkOrderOperations?finder=findBySerialNumber;SerialNumber=PRE5712,OrganizationCode=M1,DispatchState=READY"
Example Response
Here's an example of the response body in JSON format.
{ "items" : [ { "OrganizationId" : 207, "OrganizationCode" : "M1", "OrganizationName" : "Tall Manufacturing", "WorkAreaId" : 300100091177813, "WorkAreaCode" : "YLX_WA_02", "WorkAreaName" : "YLX_WA_02", "WorkCenterId" : 300100091177814, "WorkCenterCode" : "YLX_WC_02", "WorkCenterName" : "YLX_WC_02", "WorkCenterDescription" : "YLX_WC_02", "WorkOrderId" : 300100093180128, "WorkOrderNumber" : "M1-1208", "WorkOrderDescription" : "WO for prototype", "InventoryItemId" : 300100039626650, "ItemNumber" : "MI-1234", "ItemDescription" : "5.5" mobile", "OperationId" : 300100093180130, "OperationSequenceNumber" : 20, "OperationName" : "OP20", "OperationDescription" : "Assemble", "DispatchState" : "READY", "Quantity" : 10, "UnitOfMeasure" : "Each", "PlannedStartDate" : "2016-10-27T04:38:00-07:00", "PlannedCompletionDate" : "2016-10-27T04:38:00-07:00", "WorkOrderPriority" : null, "PurchaseOrderId" : null, "PurchaseOrder" : null, "PurchaseOrderLineId" : null, "PurchaseOrderLine" : null, "CustomerId" : null, "CustomerName" : null, } ] }
Get the Components List for the Work Order Operation
In this scenario, you get the components list that you must issue to fulfill the work order operation. The client gets work order number M1-1208, operation sequence number 20, and then gets the component, which is CO-1234, to issue for the operation.
Here's a typical application processing flow for the scenarios:
-
Send a REST request to get the component details.
You use the values of these attributes that you received in the response payload when you searched for work order details according to assembly serial:
Attribute
Description
WorkOrderId
Unique value that Oracle Manufacturing Cloud creates when it creates a work order. For example, 300100093180128.
WorkOrderOperationId
Unique value that Oracle Manufacturing Cloud creates when it creates a work order operation. For example, 300100093180130.
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts the values for these attributes from the response payload, and then displays them in the client.
Attribute
Description
ItemNumber
Value that uniquely identifies the component Number. For example, CO-1234.
ItemDescription
Text description of the Assembly. For example, Touch Screen.
SupplyTypeDescription
Description of the Supply Type of the component. For example, Push.
SupplySubinventory
Subinventory to use for issuing the component. For example, Stores.
SupplyLocatorId
Value that uniquely identifies the locator to use to issue the component. For example, A1-01-01.
QuantityPERProduct
Component quantity that is required for the serial of the assembly.
UnitOfMeasure
Unit of measure of the component.
Example URL
Use this resource URL format.
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/workOrders/WorkOrderId/child/WorkOrderMaterial?q=WorkOrderOperationId=WorkOrderOperationId"
For example, the following command gets component details for work order M1-1208:
curl -u username:password "https://servername/fscmRestApi/resources/version/workOrders/300100093180128/child/WorkOrderMaterial?q=WorkOrderOperationId=300100093180130"
Example Response
Here's an example of the response body in JSON format.
{ "items": [ { "OrganizationId": 207, "WorkOrderId": 300100093180128, "WorkOrderOperationId": 300100093180130, "OperationSequenceNumber": 20, "OperationName": "OP20", "StandardOperationId": null, "StandardOperationCode": null, "WorkAreaId": 300100091177813, "WorkAreaName": "YLX_WA_02", "WorkCenterId": 300100091177814, "WorkCenterName": "YLX_WC_02", "WorkOrderOperationMaterialId": 300100093180131, "MaterialSequenceNumber": 10, "MaterialType": "COMPONENT", "InventoryItemId": 300100036689391, "ItemNumber": "CO-1234", "ItemDescription": "Touch Screen", "ItemRevision": null, "QuantityPERProduct": 1, "BasisType": "2", "Quantity": 1, "InverseQuantity": 1, "UnitOfMeasure": "Each", "RequiredDate": "2016-10-27T04:38:00-07:00", "YieldFactor": 1, "IncludeInPlanningFlag": true, "SupplyType": "1", "SupplyTypeDescription": "Push", "SupplySubinventory": "Stores", "SupplyLocatorId": null, "IssuedQuantity": null, "ProducedQuantity": null, } ] }
Post the Material Transaction for the Work Order Operation
The client scans the serial number of the component to issue, DZ1234, and then posts the material transaction in Oracle Manufacturing Cloud to issue the component to the assembly.
Here's a typical application processing flow for the scenarios:
-
The client gets the component quantity issued to the serial. Send a REST request to post one material transaction in plant M1, for work order M1-1208, operation sequence 20, and component CO-1234.
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts the values for these attributes from the response payload, and then displays them in the client. This table includes only some of the attributes of the Material Transaction resource.
Note:
Some resources contain only a few attributes. Others might contain several hundred attributes.
Attribute
Description
InvTransactionId
Value that uniquely identifies the material transaction number. For example, 22386581.
ErrorsExistFlag
A flag that indicates whether the transaction succeeded or failed.
Example URL
Use this resource URL format.
POST
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/materialTransactions"
Example Request
Here's an example of the request body in JSON format.
{ "SourceSystemCode" : "Client", "SourceSystemType" : "EXTERNAL", "MaterialTransactionDetail" : [ { "OrganizationCode" : "M1", "OrganizationId" : 207, "SubinventoryCode" : "Stores", "TransactionDate" : "2016-11-01 07:55:49", "TransactionNote" : "Issued from Mobile client", "TransactionQuantity" : 1, "TransactionTypeCode" : "MATERIAL_ISSUE", "TransactionUomCode" : "Ea", "WoOperationSeqNumber" : 20, "WorkOrderNumber" : "M1-1208", "AssemblySerialNumber" : "PRE5712", "InventoryItemNumber" : "CO-1234", "TransactionSerial" : [{ "SerialNumber":"DZ1234" }] } ] }
Example Response
Here's an example of the response body in JSON format.
{ "SourceSystemCode" : "Client", "SourceSystemType" : "EXTERNAL", "ErrorsExistFlag" : "false", "MaterialTransactionDetail" : [ { "InvTransactionId" : 22386581, "SourceSystemCode" : "Client", "OrganizationCode" : "M1", "WorkOrderNumber" : " M1-1208", "AssemblySerialNumber" : "PRE5712", "WoOperationSequenceNumber" : 20, "TransactionDate" : "2016-11-01 07:55:49", "TransactionTypeCode" : " MATERIAL_ISSUE", "InventoryItemNumber" : "CO-1234", "ItemRevision" : "A", "TransactionQuantity" : 1, "TransactionUnitOfMeasure" : "Each", "SubinventoryCode" : "Stores", "Locator" : null, "WorkDefinitionCode" : null, "WorkOrderType" : null, "WorkOrderSubType" : null, "SourceHeaderReference" : null, "SourceHeaderReferenceId" : null, "SourceLineReference" : null, "SourceLineReferenceId" : null, "ReasonCode" : null, "TransactionNote" : "Issued from Mobile client", "POLineNumber" : null, "PONumber" : null, "SoldToLegalEntityName" : null, "ErrorMessages" : "", "ErrorMessageNames" : "", "TransactionSerial" : [ { "LotNumber" : null, "SerialNumber" : "DZ1234", "SerialNumberTo" : "DZ1234", "ErrorMessages" : "", "ErrorMessageNames" : "", } ] } ] }