Use the update decision model definitions reference function in Sitecore CDP REST API

Abstract

How to update the decision model definitions reference in Sitecore CDP (Data model 2.1).

You can use the Decision Model REST API to perform the update decision model definitions reference function to update the decision model reference. To do this, you need the decisionModelDefinitionRef returned when retrieving the decision model definition.

Each variantRef has an assigned split value which determines the audience percentage that the decision model will impact. The split values of the variantRef  attribute(s) must total 100.

To update the decision model definition reference in Sitecore CDP, use the following:

PUT: https://apiEndpoint/v2/decisionModelDefinitions/decisionModelDefinitionRef

Attribute

Description

Type

decisionModelDefinitionRef

The reference of the decision model.

string

{
    "name": "TEST_1539184400561_PP_1 - archived 2018-10-10 16:04",
    "modifiedByUserRef": "c008c81d-4941-46aa-b4e6-a17e8388498a",
    "modifiedAt": "2018-10-10T16:04:20.878Z",
    "revision": 4,
    "archived": true,
    "deploymentConfiguration": {
        "variants": [
            {
                "variantRef": "19700f15-4069-4121-b709-1031118677c8",
                "split": 90,
                "status": "PRODUCTION",
                "variantRevision": 1
            },
            {
                "variantRef": "42e882a5-c8a8-4149-be76-343409d10c1c",
                "split": 10,
                "status": "PRODUCTION",
                "variantRevision": 1
            }
        ]
    },
    "variants": {
        "href": "https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89/variants"
    },
    "revisions": {
        "href": "https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89/revisions"
    }
}

The following is a 200 response:

{
    "clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
    "href": "https://dev-api.boxever.com/v2/decisionModelDefinitions/5079820a-16b5-4bfd-9175-487704048d5e",
    "ref": "5079820a-16b5-4bfd-9175-487704048d5e",
    "name": "TEST_1539184400561_PP_1 - archived 2018-10-10 16:04",
    "modifiedByUserRef": "c008c81d-4941-46aa-b4e6-a17e8388498a",
    "modifiedAt": "2018-10-10T16:04:20.878Z",
    "revision": 4,
    "archived": true,
    "deploymentConfiguration": {
        "variants": [
            {
                "variantRef": "19700f15-4069-4121-b709-1031118677c8",
                "split": 90,
                "status": "PRODUCTION",
                "variantRevision": 1
            },
            {
                "variantRef": "42e882a5-c8a8-4149-be76-343409d10c1c",
                "split": 10,
                "status": "PRODUCTION",
                "variantRevision": 1
            }
        ]
    },
    "variants": {
        "href": "https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89/variants"
    },
    "revisions": {
        "href": "https://dev-api.boxever.com/v2/decisionModelDefinitions/e8878fdb-4031-423c-a12b-5691381f0c89/revisions"
    }
}