Create and Update Standard Coverages Using REST API

You can use Standard Coverages REST API to create and update your standard coverages. A standard coverage determines what entitlements you are entitled to. You can define standard coverage with entitlement rules and associate multiple coverage at the global or customer level, specific to the coverage product. You can also provide users with configured entitlements processes.

You need to follow a two-step process to create a standard coverage using REST.

  • Create an Entitlement using Pricing REST Service which is part of SCM.
  • Associate the entitlement and create a standard coverage.

Step 1: Create an Entitlement with Pricing REST Service.

Create an entitlement by submitting a POST request on the REST resource with the following URL:

fscmRestApi/resources/11.13.18.05/pricingMatrixes

Note:

You must use the pricing authorization to create an entitlement.

Example of Request Body

The following shows the contents of the request body in JSON format.

{
    "MatrixClassName": "Subscription Entitlements",
    "MatrixName": "Gold Coverage Entitlements",
    "dimensions": [
        {
            "DimensionName": "Channel Type"
        },
        {
            "DimensionName": "First Response Metric"
        },
        {
            "DimensionName": "First Response Warning Threshold"
        },
        {
            "DimensionName": "Resolution Metric"
        },
        {
            "DimensionName": "Resolution Warning Threshold"
        }
    ],
    "rules": [
        {
            "Dimension1": "Severity",
            "Dimension1Value": "High",
            "Dimension2": "Channel Type",
            "Dimension2Value": "Chat",
            "Dimension3": "Calendar",
            "Dimension3Value": "Global Schedule",
            "Dimension4": "First Response Metric",
            "Dimension4Value": 25,
            "Dimension5": "First Response Warning Threshold",
            "Dimension5Value": 10,
            "Dimension6": "Resolution Metric",
            "Dimension6Value": 10,
            "Dimension7": "Resolution Warning Threshold",
            "Dimension7Value": 5
        }
    ]
}

Example of Response Body

The following shows the contents of the response body in JSON format.

{
    "MatrixId": 300100543706812,
    "MatrixName": "Gold Coverage Entitlements",
    "MatrixClassName": "Subscription Entitlements",
    "MatrixClassId": 100100112405854,
    "CreationDate": "2021-04-15T09:26:34+00:00",
    "CreatedBy": "PRICING_MGR_OPERATIONS",
    "LastUpdateDate": "2021-04-15T09:26:45.385+00:00",
    "LastUpdatedBy": "PRICING_MGR_OPERATIONS",
    "dimensions": [
        {
            "MatrixDimensionId": 300100543706815,
            "MatrixId": 300100543706812,
            "DimensionName": "Channel Type",
            "DimensionId": 100100112409574,
            "DimensionType": "Condition",
            "DataType": "STRING",
            "DomainType": "LOOK_UP",
            "DisplaySequence": 102,
            "ComparisonOperatorCode": "E",
            "CompareToAttribute": "ChannelCode",
            "RequiredDimensionForClass": "N",
            "IsNullable": "Y",
            "NullasWildCard": "Y",
            "DefaultIsFixedValue": "N",
            "CreationDate": "2021-04-15T09:26:40.997+00:00",
            "CreatedBy": "PRICING_MGR_OPERATIONS",
            "LastUpdateDate": "2021-04-15T09:26:45.832+00:00",
            "LastUpdatedBy": "PRICING_MGR_OPERATIONS",
            "links": [
…
}

Step 2: Associate the Entitlement and Create a Standard Coverage.

Create a standard coverage by submitting a POST request on the REST resource using the following URL:

crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders

Example of Request Body

The following shows the contents of the request body in JSON format.

{
    "CoverageName": "Gold Coverage",
    "CoverageDescription": "Gold Coverage Template",
    "DynamicMatrixClassName": "Subscription Entitlements",
    "StartDate": "2020-01-01",
    "EndDate": "2025-12-31",
    "MatrixName": "Gold Coverage Entitlements",
    "CoverageChargeDiscounts": [
        {
            "ServiceActivityName": "Install",
            "BillingTypeMeaning": "Material",
            "AdjustmentTypeMeaning": "Discount percent",
            "AdjustmentAmount": 2,
            "PricingBasisName": "QP_AdjBasisforListPrc",
            "BusinessProcessMeaning": "Depot Repair"
        }
    ]
}

Example of Response Body

The following shows the contents of the response body in JSON format.

{
    "CoverageName": "Gold Coverage",
    "CoverageDescription": "Gold Coverage Template",
    "CoverageHeaderId": 300100543803294,
    "DynamicMatrixClassId": 100100112405854,
    "DynamicMatrixClassName": "Subscription Entitlements",
    "MatrixId": 300100543706812,
    "MatrixName": "Gold Coverage Entitlements",
    "StartDate": "2020-01-01",
    "EndDate": "2025-12-31",
    "CreatedBy": "CONMGR",
    "CreationDate": "2021-04-15T09:39:48.989+00:00",
    "LastUpdateDate": "2021-04-15T09:39:48.990+00:00",
    "LastUpdateLogin": "BFC59638FF8EE213E0531C5CF00A40CE",
    "LastUpdatedBy": "CONMGR",
    "CoverageHeaderPuid": "CDRM_7035",
    "StandardCoverageYn": "Y",
    "SubscriptionProductPuid": null,
    "CoverageChargeDiscounts": [
        {
            "ChargeDiscountId": 300100543803295,
            "CoverageHeaderId": 300100543803294,
            "ServiceActivityId": 300100174857818,
            "ServiceActivityName": "Install",
            "BillingTypeCode": "M",
            "BillingTypeMeaning": "Material",
            "AdjustmentTypeCode": "DISCOUNT_PERCENT",
            "AdjustmentTypeMeaning": "Discount percent",
            "AdjustmentAmount": 2,
            "PricingBasisId": 300100071623810,
            "PricingBasisName": "QP_AdjBasisforListPrc",
            "PricingTermId": 300100543803296,
            "StartDate": null,
            "EndDate": null,
            "CreatedBy": "CONMGR",
            "CreationDate": "2021-04-15T09:39:45.348+00:00",
            "LastUpdatedBy": "CONMGR",
            "LastUpdateDate": "2021-04-15T09:39:57.303+00:00",
            "LastUpdateLogin": "BFC59638FF8EE213E0531C5CF00A40CE",
            "AllowCustomAdjustmentsFlag": true,
            "AllowPricingDiscountsFlag": false,
            "CoverageDiscountPuid": "CDRM_7035-CADJ-1001",
            "BusinessProcessCode": "DEPOTREPAIR",
            "BusinessProcessMeaning": "Depot Repair",
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035/child/CoverageChargeDiscounts/CDRM_7035-CADJ-1001",
                    "name": "CoverageChargeDiscounts",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035/child/CoverageChargeDiscounts/CDRM_7035-CADJ-1001",
                    "name": "CoverageChargeDiscounts",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035",
                    "name": "subscriptionCoverageHeaders",
                    "kind": "item"
                }
            ]
        }
    ],
    "links": [
…
}

Update Standard Coverage

You can update a standard coverage by submitting a PATCH request on the REST resource using the following URL:

crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035

Example of Request Body

The following shows the contents of the Request Body in JSON format.

{
    "CoverageDescription": "Gold Premium Coverage Template"
}

Example of Response Body

The following shows the contents of the response body in JSON format.

{
    "CoverageName": "Gold Coverage",
    "CoverageDescription": "Gold Premium Coverage Template",
    "CoverageHeaderId": 300100543803294,
    "DynamicMatrixClassId": 100100112405854,
    "DynamicMatrixClassName": "Subscription Entitlements",
    "MatrixId": 300100543706812,
    "MatrixName": "Gold Coverage Entitlements",
    "StartDate": "2020-01-01",
    "EndDate": "2025-12-31",
    "CreatedBy": "CONMGR",
    "CreationDate": "2021-04-15T09:46:43+00:00",
    "LastUpdateDate": "2021-04-15T09:46:43.001+00:00",
    "LastUpdateLogin": "BFB17732D7F10395E0531C5CF00ADC77",
    "LastUpdatedBy": "CONMGR",
    "CoverageHeaderPuid": "CDRM_7035",
    "StandardCoverageYn": "Y",
    "SubscriptionProductPuid": null,
    "links": [
        {
            "rel": "self",
            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035",
            "name": "subscriptionCoverageHeaders",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035",
            "name": "subscriptionCoverageHeaders",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptionCoverageHeaders/CDRM_7035/child/CoverageChargeDiscounts",
            "name": "CoverageChargeDiscounts",
            "kind": "collection"
        }
    ]
}