Post and Get Collaboration Order Forecasts Requests
You can use a REST API to create and update current collaboration cycle order forecasts and review the status of these submissions for the last 7 days.
Let's discuss these scenarios:
- Post new collaboration order forecasts.
- Get current collaboration cycle order forecasts requests in error status for a collaboration plan.
Here's a typical application processing flow for the scenarios:
- You configure collaboration order forecasts in Oracle Supply Chain Collaboration Cloud.
- You can publish collaboration order forecasts from an external supply plan.
- You can view any recently submitted collaboration order forecasts that failed to successfully process during the Supply Planning Collaboration Decomposition scheduled process.
Post New Collaboration Order Forecasts
To post collaboration order forecasts:
- Post multiple collaboration order forecasts from the client to the server. This post creates new collaboration order forecasts for the given SupplyPlanName, ShipFromSupplierSiteName, ShipToOrganizationCode, ItemNumber, Quantity, PublisherOrderTypeCode and BucketStartDate.
- The response payload includes details that describe the results of the request.
- If needed your application can extract
the values for the following attributes from the response payload,
and display them in the client.
Attribute Description CollaborationOrderForecastRequestId Value that uniquely identifies the collaboration order forecast requests. SupplyPlanName Name of the supply plan. This value is used to determine which collaboration plan is associated to the collaboration order forecasts. 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. details.BucketStartDate Date when the time bucket starts. details.PublisherOrderTypeCode Value that identifies the publisher order type quantity. This attribute can contain one of the following values: PURCHASE_ORDERS, PURCHASE_REQUISITIONS, SHIPMENTS_IN_RECEIVING, IN_TRANSIT_SHIPMENTS, PLANNED_ORDERS, ON_HAND or SUPPLY_FORECAST. details.Quantity Quantity of the supply forecast.
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": "/collaborationOrderForecastRequests", "operation": "create", "payload": {"SupplyPlanName": "US_Production", "SupplyPlanDescription": "US_Production", "ShipFromSupplierName" :"CV_SuppD01", "ShipToOrganizationCode":"M2", "ShipFromSupplierSiteName":"CV_SuppD01Site1", "ItemNumber": "SCC-PRCXL-03", "details": [{"Quantity": 25, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-10"},{"Quantity": 30, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-17"}]}},{"id": "part2", "path": "/collaborationOrderForecastRequests", "operation": "create", "payload": {"SupplyPlanName": "US_Production", "SupplyPlanDescription": "US_Production", "ShipFromSupplierName" :"CV_SuppD01", "ShipToOrganizationCode":"M2", "ShipFromSupplierSiteName":"CV_SuppD01Site1", "ItemNumber": "SCC-PRCXL-05", "details": [{"Quantity": 50, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-10"},{"Quantity": 60, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-17"}]}}]}
Example Request
Here's an example of the request body in JSON format.
{ "id": "part1", "path": "/collaborationOrderForecastRequests", "operation": "create", "payload": { "SupplyPlanName": "US_Production", "SupplyPlanDescription": "US_Production", "ShipFromSupplierName" :"CV_SuppD01", "ShipToOrganizationCode":"M2", "ShipFromSupplierSiteName":"CV_SuppD01Site1", "ItemNumber": "SCC-PRCXL-03", "details": [ { "Quantity": 25, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-10" }, { "Quantity": 30, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-17" } ] } }, { "id": "part2", "path": "/collaborationOrderForecastRequests", "operation": "create", "payload": { "SupplyPlanName": "US_Production", "SupplyPlanDescription": "US_Production", "ShipFromSupplierName" :"CV_SuppD01", "ShipToOrganizationCode":"M2", "ShipFromSupplierSiteName":"CV_SuppD01Site1", "ItemNumber": "SCC-PRCXL-05", "details": [ { "Quantity": 50, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-10" }, { "Quantity": 60, "PublisherOrderTypeCode":"SUPPLY_FORECAST", "BucketStartDate": "2018-09-17" } ] } }
Example Response
Here's an example of the response body in JSON format.
{ "parts": [ { "id": "part1", "path": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests", "operation": "create", "payload": { "CollaborationOrderForecastRequestId": 300100162501933, "StatusCode": "SUBMITTED", "SupplyPlanName": "US_Production", "SupplyPlanDescription": "US_Production", "ProcurementBUName": null, "ShipFromSupplierName": "CV_SuppD01", "ShipFromSupplierSiteName": "CV_SuppD01Site1", "ShipToOrganizationCode": "M2", "ShipToCustomerName": null, "ShipToCustomerSiteName": null, "ItemNumber": "SCC-PRCXL-03", "CreatedBy": "OPERATIONS", "CreationDate": "2018-07-17T20:23:14+00:00", "details": [ { "CollaborationOrderForecastRequestId": "300100162501933", "PublisherOrderTypeCode": "SUPPLY_FORECAST", "BucketStartDate": "2018-09-10", "Quantity": 25, "ReferenceHeaderId": null, "ReferenceLineId": null, "ReferenceLineLocationId": null, "ReferenceHeaderNumber": null, "ReferenceLineNumber": null, "ReferenceLineLocationNumber": null, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933/child/details/300100162501936", "name": "details", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933/child/details/300100162501936", "name": "details", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933", "name": "collaborationOrderForecastRequests", "kind": "item" } ] }, { "CollaborationOrderForecastRequestId": "300100162501933", "PublisherOrderTypeCode": "SUPPLY_FORECAST", "BucketStartDate": "2018-09-17", "Quantity": 30, "ReferenceHeaderId": null, "ReferenceLineId": null, "ReferenceLineLocationId": null, "ReferenceHeaderNumber": null, "ReferenceLineNumber": null, "ReferenceLineLocationNumber": null, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933/child/details/300100162501937", "name": "details", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933/child/details/300100162501937", "name": "details", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933", "name": "collaborationOrderForecastRequests", "kind": "item" } ] } ], "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933", "name": "collaborationOrderForecastRequests", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000037704000000037372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C71007E000371007E000378" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933", "name": "collaborationOrderForecastRequests", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933/child/details", "name": "details", "kind": "collection" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501933/child/requestStatusDetails", "name": "requestStatusDetails", "kind": "collection" } ] } }, { "id": "part2", "path": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests", "operation": "create", "payload": { "CollaborationOrderForecastRequestId": 300100162501938, "StatusCode": "SUBMITTED", "SupplyPlanName": "US_Production", "SupplyPlanDescription": "US_Production", "ProcurementBUName": null, "ShipFromSupplierName": "CV_SuppD01", "ShipFromSupplierSiteName": "CV_SuppD01Site1", "ShipToOrganizationCode": "M2", "ShipToCustomerName": null, "ShipToCustomerSiteName": null, "ItemNumber": "SCC-PRCXL-05", "CreatedBy": "OPERATIONS", "CreationDate": "2018-07-17T20:23:14.044+00:00", "details": [ { "CollaborationOrderForecastRequestId": "300100162501938", "PublisherOrderTypeCode": "SUPPLY_FORECAST", "BucketStartDate": "2018-09-10", "Quantity": 50, "ReferenceHeaderId": null, "ReferenceLineId": null, "ReferenceLineLocationId": null, "ReferenceHeaderNumber": null, "ReferenceLineNumber": null, "ReferenceLineLocationNumber": null, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938/child/details/300100162501941", "name": "details", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938/child/details/300100162501941", "name": "details", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938", "name": "collaborationOrderForecastRequests", "kind": "item" } ] }, { "CollaborationOrderForecastRequestId": "300100162501938", "PublisherOrderTypeCode": "SUPPLY_FORECAST", "BucketStartDate": "2018-09-17", "Quantity": 60, "ReferenceHeaderId": null, "ReferenceLineId": null, "ReferenceLineLocationId": null, "ReferenceHeaderNumber": null, "ReferenceLineNumber": null, "ReferenceLineLocationNumber": null, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938/child/details/300100162501942", "name": "details", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938/child/details/300100162501942", "name": "details", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938", "name": "collaborationOrderForecastRequests", "kind": "item" } ] } ], "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938", "name": "collaborationOrderForecastRequests", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000037704000000037372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C71007E000371007E000378" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938", "name": "collaborationOrderForecastRequests", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938/child/details", "name": "details", "kind": "collection" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests/300100162501938/child/requestStatusDetails", "name": "requestStatusDetails", "kind": "collection" } ] } } ] }
Get Current Collaboration Cycle Order Forecast Requests in Error Status for a Collaboration Plan
To get all current cycle request submission in error status and expose the error type and detail:
- Query the current collaboration cycle order
forecast requests in error status and display the StatusDetailType
and StatusDetailCode. The order forecast request will remain in the
SUBMITTED status until the Supply Planning Collaboration Decomposition
schedule process has completed.
Note:
In order to query attribute values for a child resource, you must add the header, REST-Framework-Version: 2. - The response payload includes details that describe the results of the request.
- You can extract the values for the following
attributes from the response payload, and display them in the client.
Attribute Description CollaborationOrderForecastRequestId Value that uniquely identifies the collaboration order forecast requests. StatusCode Identifies the current state of the collaboration order forecast request. This attribute can contain one of the following values: COMPLETED, ERROR, EXPIRED and PROCESSING. SupplyPlanName Name of the supply 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. requestStatusDetails.StatusDetailType Value that identifies the status detail type. This attribute can contain Error or Information. requestStatusDetails.StatusDetailCode Value that identifies the status of the collaboration order forecast submission. This attribute is used to provide any errors or status information regarding the collaboration order forecast during Supply Planning Collaboration Decomposition scheduled process.
Example URL
Use this resource URL format.
GET
curl --user username:password "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests?q=SupplyPlanName='US_Production';StatusCode='ERROR'&fields=CollaborationOrderForecastRequestId,StatusCode,SupplyPlanName,ShipFromSupplierName,ShipFromSupplierSiteName,ShipToOrganizationCode,ItemNumber;requestStatusDetails:StatusDetailType,StatusDetailCode&onlyData=true"
Example Response
Here's an example of the response body in JSON format.
{ "items": [ { "CollaborationOrderForecastRequestId": 300100162449281, "StatusCode": "ERROR", "SupplyPlanName": "US_Production", "ShipFromSupplierName": "CV_SuppD01", "ShipFromSupplierSiteName": "CVSuppA01Site01", "ShipToOrganizationCode": "M3", "ItemNumber": "SCC-PRCXL-05", "requestStatusDetails": [ { "StatusDetailType": "ERROR", "StatusDetailCode": "ERROR_INVALID_SUPPLIERSITECODE" } ] }, ], "count": 1, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationOrderForecastRequests", "name": "collaborationOrderForecastRequests", "kind": "collection" } ] }