Get Collaboration Order Forecasts and Post Commitments
You can use a REST API to retrieve published collaboration order forecasts and provide commitments to those forecasts.
- Get collaboration order forecast quantities for a collaboration plan.
- Post commit quantities for each forecast within the plan.
Here's a typical application processing flow for the scenarios:
- You configure collaboration order forecasts in Oracle Supply Chain Collaboration Cloud.
- You can view all collaboration order forecast quantities for a given collaboration plan and isolates specific fields for an efficient payload.
- The supplier processes the forecast information to calculate commit quantities for the future shipments.
Get Collaboration Order Forecast Quantities for a Collaboration Plan
To get forecast quantities for a collaboration plan:
- Query the collaboration order forecast quantities for a given collaboration plan by using the following cURL command:
- The response payload includes details that describe the results of the request.
- The supplier extracts these values from the response payload.
Attribute | Description |
---|---|
CollaborationOrderForecastId | Value that uniquely identifies the collaboration order forecast. |
CollaborationPlanName | Name of the collaboration plan. |
ShipFromSupplierSiteName | Name of the supplier site that ships the item. |
ShipToOrganizationCode | Abbreviation that identifies the organization that receives the item. |
ItemNumber | Number of the item. |
SupplierItemNumber | Name of the item referred to by the supplier. |
UOMCode | Abbreviation that identifies the unit of measure for the item. |
OnHandQuantity | Quantity of the on-hand inventory for the collaboration order forecast item. |
CommitDueDate | Date when the supply commits are due for the collaboration order forecast. |
ForecastQuantities.BucketStartDate | Date when the time bucket starts. |
ForecastQuantities.BucketEndDate | Date when the time bucket ends. |
ForecastQuantities.Quantity | Quantity of the supply forecast. |
Example URL
Use this resource URL format.
GET
curl --user username:password "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts?q=CollaborationPlanName='US_Production'&fields=CollaborationOrderForecastId,CollaborationPlanName,ShipFromSupplierSiteName,ShipToOrganizationCode,ItemNumber,SupplierItemNumber,UOMCode,OnHandQuantity,CommitDueDate,ForecastTotalCommitHorizonQuantity,CommitTotalQuantity;forecastQuantities:BucketStartDate,BucketEndDate,Quantity&onlyData=true"
Example Response
Here's an example of the response body in JSON format.
{ "items": [ { "CollaborationOrderForecastId": 19019, "CollaborationPlanName": "US_Production", "ShipFromSupplierSiteName": "CV_SuppD01Site1", "ShipToOrganizationCode": "M2", "ItemNumber": "SCC-PRCXL-03", "UOMCode": "Ea", "SupplierItemNumber": "SCC-Supplier-PRCXL-3", "ForecastTotalCommitHorizonQuantity": 55, "CommitTotalQuantity": null, "OnHandQuantity": 5, "CommitDueDate": "2018-07-27T20:23:53+00:00", "forecastQuantities": [ { "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 25 }, { "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 30 } ] }, { "CollaborationOrderForecastId": 19020, "CollaborationPlanName": "US_Production", "ShipFromSupplierSiteName": "CV_SuppD01Site1", "ShipToOrganizationCode": "M2", "ItemNumber": "SCC-PRCXL-05", "UOMCode": "Ea", "SupplierItemNumber": "SCC-Supplier-PRCXL-5", "ForecastTotalCommitHorizonQuantity": 110, "CommitTotalQuantity": null, "OnHandQuantity": 40, "CommitDueDate": "2018-07-27T20:23:56+00:00", "forecastQuantities": [ { "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 50 }, { "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 60 } ] } ], "count": 2, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts", "name": "collaborationOrderForecasts", "kind": "collection" } ] }
Post Commit Quantities for Each Forecast Within the Plan
To post commit quantities:
- Run the POST operation against the URL to post multiple commit quantities from the client to the server.
- The server sends a reply in the response payload. This payload includes details that describe the results of the request.
- Collaboration order forecasts updates are
processed asynchronously so the response will return a null payload
for each create operation.
Attribute Description CollaborationOrderForecastId Value that uniquely identifies the collaboration order forecast. commitQuantities.BucketStartDate Date when the time bucket starts. commitQuantities.BucketEndDate Date when the time bucket ends. commitQuantities.Quantity Quantity of the supplier commit. Example URL
Use this resource URL format.
POST
curl --user username:password -H "Content-Type:application/vnd.oracle.adf.batch+json" https://servername/fscmRestApi/resources/version -d'{"parts": [{"id": "part1", "path": "/collaborationOrderForecasts/19019/child/commitQuantities", "operation": "create", "payload": {"CollaborationOrderForecastId": 19019, "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 20}},{"id": "part2", "path": "/collaborationOrderForecasts/19019/child/commitQuantities", "operation": "create", "payload": {"CollaborationOrderForecastId": 19019, "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 30}},{"id": "part3", "path": "/collaborationOrderForecasts/19020/child/commitQuantities", "operation": "create", "payload": {"CollaborationOrderForecastId": 19020, "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 50}},{"id": "part4", "path": "/collaborationOrderForecasts/19020/child/commitQuantities", "operation": "create", "payload": {"CollaborationOrderForecastId": 19020, "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 60}}]}'
Example Request
Here's an example of the request body in JSON format.
{ "parts": [ { "id": "part1", "path": "/collaborationOrderForecasts/19019/child/commitQuantities", "operation": "create", "payload": { "CollaborationOrderForecastId": 19019, "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 20 } }, { "id": "part2", "path": "/collaborationOrderForecasts/19019/child/commitQuantities", "operation": "create", "payload": { "CollaborationOrderForecastId": 19019, "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 30 } }, { "id": "part3", "path": "/collaborationOrderForecasts/19020/child/commitQuantities", "operation": "create", "payload": { "CollaborationOrderForecastId": 19020, "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 50 } }, { "id": "part4", "path": "/collaborationOrderForecasts/19020/child/commitQuantities", "operation": "create", "payload": { "CollaborationOrderForecastId": 19020, "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 60 } } ] }
Example Response
Here's an example of the response body in JSON format.
{ "parts": [ { "id": "part1", "path": "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts/19019/child/commitQuantities", "operation": "create", "payload": null }, { "id": "part2", "path": "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts/19019/child/commitQuantities", "operation": "create", "payload": null }, { "id": "part3", "path": "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts/19020/child/commitQuantities", "operation": "create", "payload": null }, { "id": "part4", "path": "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts/19020/child/commitQuantities", "operation": "create", "payload": null } ] }
- Once processed, if you need to view the
posted details of the commit quantities, you can use this example
to get all collaboration order commit quantities for a given collaboration
plan.
Example URL
Use this resource URL format.
GET
curl --user username:password "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts?q=CollaborationPlanName='US_Production'&fields=CollaborationOrderForecastId,CollaborationPlanName,ShipFromSupplierSiteName,ShipToOrganizationCode,ItemNumber,SupplierItemNumber,UOMCode,OnHandQuantity,CommitDueDate,ForecastTotalCommitHorizonQuantity,CommitTotalQuantity;commitQuantities:BucketStartDate,BucketEndDate,Quantity&onlyData=true"
- The server processes the request. The server
sends a reply in the response payload.
Example Response
Here's an example of the response body in JSON format.
{ "items": [ { "CollaborationOrderForecastId": 19019, "CollaborationPlanName": "US_Production", "ShipFromSupplierSiteName": "CV_SuppD01Site1", "ShipToOrganizationCode": "M2", "ItemNumber": "SCC-PRCXL-03", "UOMCode": "Ea", "SupplierItemNumber": "SCC-Supplier-PRCXL-3", "ForecastTotalCommitHorizonQuantity": 55, "CommitTotalQuantity": 50, "OnHandQuantity": 5, "CommitDueDate": "2018-07-27T20:23:53+00:00", "commitQuantities": [ { "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 20 }, { "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 30 } ] }, { "CollaborationOrderForecastId": 19020, "CollaborationPlanName": "US_Production", "ShipFromSupplierSiteName": "CV_SuppD01Site1", "ShipToOrganizationCode": "M2", "ItemNumber": "SCC-PRCXL-05", "UOMCode": "Ea", "SupplierItemNumber": "SCC-Supplier-PRCXL-5", "ForecastTotalCommitHorizonQuantity": 110, "CommitTotalQuantity": 110, "OnHandQuantity": 40, "CommitDueDate": "2018-07-27T20:23:56+00:00", "commitQuantities": [ { "BucketStartDate": "2018-09-10", "BucketEndDate": "2018-09-10", "Quantity": 50 }, { "BucketStartDate": "2018-09-17", "BucketEndDate": "2018-09-17", "Quantity": 60 } ] } ], "count": 2, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecasts", "name": "collaborationOrderForecasts", "kind": "collection" } ] }