Find and Update a Document Definition's Measure Parameters

You create a solution that allows your customer to use a client to connect to your partner application, and then use REST API to update a document definition's boundary parameters for demand collaboration.

Let's discuss this scenario:
  • Find and update a document definition's measure parameters.

Here's a typical application processing flow for the scenario:

  • Retrieve the Forecast document definition, including the measure parameters.

  • Update the locked fence boundary measure parameter for the Order Forecast measure.

  • Update the participant list to control which parties can create and edit a measure's quantities.

Retrieve the Forecast Document Definition Including Measure Parameters

To retrieve the Forecast document:

  1. Authenticate as an administrative user.
  2. Run the GET operation against the Collaboration Document Definitions resource

    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 User Key
collaborationDocumentDefinitions.DocumentId Value that uniquely identifies the document definition. N/A
collaborationDocumentDefinitions.DocumentTypeCode Abbreviation that identifies the type of document used for collaboration. N/A
collaborationDocumentDefinitions.DocumentTypeName Type of document used for collaboration. N/A
collaborationDocumentDefinitions.CustomerLevel Level of the customer a document accepts for collaboration. N/A
collaborationDocumentDefinitions.OrganizationLevel Level of the organization a document accepts for collaboration. N/A
collaborationDocumentDefinitions.ItemLevel Level of the item a document accepts for collaboration. N/A
measures.DocumentMeasureId Value that uniquely identifies the document measure. N/A
measures.MeasureTypeCode Abbreviation that identifies the type of measure used for collaboration. N/A
measures.MeasureTypeName Name of the type of measure used for collaboration. N/A
measures.ParticipantOwnerCode Abbreviation that identifies the measure's participant owner. Accepted values are ORA_VCS_CUSTOMER or ORA_VCS_ENTERPRISE. N/A
measures.ParticipantOwnerName Name of the measure's owning participant. N/A
measureParameters.ParameterCode Abbreviation that identifies the parameter on the document measure. N/A
measureParameters.ParameterName Name of the parameter of the document measure. N/A
measureParameters.ParameterValue Value of the parameter of the document measure. N/A
measureParameters.SecondParameterValue Second value of the parameter of the document measure. A list of accepted values is defined in the lookup type ORA_VCS_MEASURE_BOUNDARY_TYPE when the ParameterCode is MEASURE_HISTORY, MEASURE_HORIZON, or LOCKED_FENCE. N/A

Example URL

Use this resource URL format:

GET
curl -u username:password -X GET -H "Content-Type:application/json" -d 'request payload' "https://servername/fscmRestApi/resources/version/collaborationDocumentDefinitions/-10001/child/measures/-12003?expand=measureParameters&onlyData=true"

Example Response

Here's an example of the response body in JSON format:pre
{
    "DocumentMeasureId": -12003,
    "MeasureId": -11003,
    "MeasureTypeCode": "ORDER_FORECAST",
    "MeasureTypeName": "Order Forecast",
    "ParticipantOwnerCode": "ORA_VCS_CUSTOMER",
    "ParticipantOwnerName": "Customer",
    "DataTypeCode": "Number",
    "CreatedBy": "SEED_DATA_FROM_APPLICATION",
    "CreationDate": "2021-08-26T08:48:53.486+00:00",
    "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION",
    "LastUpdateDate": "2021-08-26T08:48:53.500+00:00",
    "measureParameters": {
        "items": [
            {
                "InstanceParameterId": -14018,
                "ParameterCode": "LOCKED_FENCE",
                "ParameterName": "Locked Time Fence",
                "ParameterValue": "0",
                "SecondParameterValue": "ORA_VCS_DAYS",
                "CreatedBy": "SEED_DATA_FROM_APPLICATION",
                "CreationDate": "2021-08-26T08:50:09.225+00:00",
                "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION",
                "LastUpdateDate": "2021-08-26T08:50:09.238+00:00"
            },
            {
                "InstanceParameterId": -14008,
                "ParameterCode": "MEASURE_HISTORY",
                "ParameterName": "Measure History",
                "ParameterValue": "0",
                "SecondParameterValue": "ORA_VCS_CURRENT_WEEK",
                "CreatedBy": "SEED_DATA_FROM_APPLICATION",
                "CreationDate": "2021-08-26T08:50:09.255+00:00",
                "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION",
                "LastUpdateDate": "2021-08-26T08:50:09.279+00:00"
            },
            {
                "InstanceParameterId": -14004,
                "ParameterCode": "MEASURE_HORIZON",
                "ParameterName": "Measure Horizon",
                "ParameterValue": "52",
                "SecondParameterValue": "ORA_VCS_WEEKS",
                "CreatedBy": "SEED_DATA_FROM_APPLICATION",
                "CreationDate": "2021-08-26T08:50:09.301+00:00",
                "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION",
                "LastUpdateDate": "2021-08-26T08:50:09.312+00:00"
            },
            {
                "InstanceParameterId": -14001,
                "ParameterCode": "RETAIN_PREVIOUS_CYCLE_DATA_FLAG",
                "ParameterName": "Retain Previous Cycle Data",
                "ParameterValue": "Y",
                "SecondParameterValue": null,
                "CreatedBy": "SEED_DATA_FROM_APPLICATION",
                "CreationDate": "2021-08-26T08:50:09.320+00:00",
                "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION",
                "LastUpdateDate": "2021-08-26T08:50:09.325+00:00"
            }
        ],
        "count": 4,
        "hasMore": false,
        "limit": 24,
        "offset": 0,
        "links": [
            {
                "rel": "self",
                "href": "https://servername/fscmRestApi/resources/version/collaborationDocumentDefinitions/-10001/child/measures/-12003/child/measureParameters",
                "name": "measureParameters",
                "kind": "collection"
            }
        ]
    }
}

Update Locked Fence Boundary Measure Parameter for Order Forecast Measure

To retrieve the Forecast document:

  1. Run the PATCH operation against the Measure Parameters resource.
  2. Run the POST operation against the Collaboration Demand Planners resource to add a demand collaborator.

    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 User Key
collaborationDocumentDefinitions.DocumentId Value that uniquely identifies the document definition. N/A
measures.DocumentMeasureId Value that uniquely identifies the document measure. N/A
measureParameters.InstanceParameterId Value that uniquely identifies the instance of the measure parameter. N/A
measureParameters.ParameterCode Abbreviation that identifies the parameter on the document measure. N/A
measureParameters.ParameterName Name of the parameter of the document measure. N/A
measureParameters.ParameterValue Value of the parameter of the document measure. N/A
measureParameters.SecondParameterValue Second value of the parameter of the document measure. A list of accepted values is defined in the lookup type ORA_VCS_MEASURE_BOUNDARY_TYPE when the ParameterCode is MEASURE_HISTORY, MEASURE_HORIZON, or LOCKED_FENCE. N/A

Example URL

Use this resource URL format:

PATCH measureParameters

curl -u username:password -X PATCH -H "Content-Type:application/json" -d 'request payload' "https://servername/fscmRestApi/resources/version/collaborationDocumentDefinitions/-10001/child/measures/-12003/child/measureParameters/-14018

Example Request

Here's an example of the request body in JSON format:

{
    "ParameterValue":2,
    "SecondParameterValue":"ORA_VCS_WEEKS"
}

Example Response

Here's an example of the response body in JSON format:
{
    "InstanceParameterId": -14018,
    "ParameterCode": "LOCKED_FENCE",
    "ParameterName": "Locked Time Fence",
    "ParameterValue": "2",
    "SecondParameterValue": "ORA_VCS_WEEKS",
    "CreatedBy": "SEED_DATA_FROM_APPLICATION",
    "CreationDate": "2021-08-26T08:50:09.225+00:00",
    "LastUpdatedBy": "SCMOPERATIONS",
    "LastUpdateDate": "2021-08-31T20:38:29.685+00:00",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/collaborationDocumentDefinitions/-10001/child/measures/-12003/child/measureParameters/-14018",
            "name": "measureParameters",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/collaborationDocumentDefinitions/-10001/child/measures/-12003/child/measureParameters/-14018",
            "name": "measureParameters",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://servername/fscmRestApi/resources/version/collaborationDocumentDefinitions/-10001/child/measures/-12003",
            "name": "measures",
            "kind": "item"
        }
    ]
}