Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore Personalize
Data privacy
Before you start sending data
Integrating with Sitecore Personalize
Stream API
Personalize API Flow execution
REST APIs
  • Sitecore Personalize for developers
  • REST APIs
  • Decision model variant REST API
  • Create a decision model variant

Create a decision model variant

POST /v2/decisionModelDefinitions/<decisionModelRef>/variants

Creates a variant of a decision model.

Attribute

Type

Description

Example

decisionModelRef

string

The reference of the decision model.

If you do not know the decision model reference, first retrieve decision models.

865ce079-6012-4f97-bc46-07215691a178

At a minimum, you must provide the following required attributes in the request body:

Attribute

Type

Description

Example

name

string

The name of the decision model.

"Determine Ancillary Upsell Variant 2"

definition

string

The definition of the decision model variant that belongs to the decision canvas.

"mys3cr3tstr1ingforauth1!x"

RequestResponse
curl -X POST '<baseURL>/v2/decisionModelDefinitions/865ce079-6012-4f97-bc46-07215691a178/variants' \
-H 'Authorization: Bearer <accessToken>' \
-H 'Accept: application/json' \
--data-raw '
{  
   "name":"Determine Ancillary Upsell Variant 2",
   "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />"
}'
RequestResponse
{  
   "clientKey":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
   "href":"<baseURL>/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4",
   "ref":"4ee0797d-e229-492d-883e-1344787002b4",
   "name":"Determine Ancillary Upsell Variant 2",
   "modifiedByUserRef":"25f46901-bc51-45e8-b587-148aecf1e48f",
   "modifiedAt":"2020-10-05T07:37:49.650Z",
   "revision":1,
   "archived":false,
   "decisionModelDefinitionRef":"865ce079-6012-4f97-bc46-07215691a178",
   "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />",
   "transpiledDefinition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />",
   "revisions":{  
      "href":"<baseURL>/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4/revisions"
   },
   "offers":[]
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore