Recommendations

The Recommendations API identifies consumption patterns from your transaction information in order to provide recommendations. These recommendations can help your customers more easily discover items that they may be interested in.
By showing your customers products that they are more likely to be interested in, you will, in turn, increase your sales.

Create/Trigger build

By creating a new build, you start the training process that will allow you to generate a machine learning model that you can later on query for recommendations.

Before triggering a build you first must upload catalog and usage data. Triggering a new build is an asynchronous operations. Once a build is triggered you will receive an operation (in the Operation-Location header of the response) that you can use to track the build status, or to cancel the build operation. See the "Retrieve the status of an operation" API.

There are 4 types of builds: a Recommendation build, a Rank build, an FBT (Frequently-Bought-Together) build and a SAR (Smart Adaptive Recommendations) build.

Recommendation build
Predictions (for this type of build) come in two flavors:

Item to Item recommendations (I2I)
Given an item or a list of items, it will predict other items that are likely to be of high interest to customers that have interacted with the original set of items.

User to Item recommendations (U2I)
Given a user id (and optionally a list of items) this option will predict a list of items that are likely to be of high interest to the given user (and its additional choice of items). The U2I recommendations are based on the history of items that were of interest to the user.

FBT (Frequently-Bought-Together) build
An FBT build is yet another recommendations algorithm called sometimes a "conservative" recommender. It counts the number of times two or three different products co-occur together, and then sorts the sets based on a similarity function (Co-occurrences, Jaccard, Lift). Given an item, and FBT build returns other items that are likely to occur in the same transaction.
Note: If the usage files that you uploaded contain the optional field "event type", for FBT modelling all events are used.

SAR (Smart Adaptive Recommendations) build
A SAR build takes computes user affinities at scoring time, thus allowing recommendations to be adapted/customized recommendations at scoring time. A SAR build supports user-to-item recommendations and item-to-item recommendations. In our testing, a SAR build generally leads to higher conversion than a "recommendations" build.

Rank build
A rank build is a technical build that allows you to learn about the usefulness of your features.

Learn more
More information about different build types can be found on the Build Types and Model Quality document.

Generic Build Parameters

Name Description Type Valid Value
Description The description of the build. String Any text, maximum 512 chars
BuildType The type of build. String Either recommendation, fbt or rank

Recommendation Build Type Parameters

Name Description Type Valid Value
NumberOfModelIterations The number of iterations the model performs is reflected by the overall compute time and the model accuracy. The higher the number, the better accuracy you will get, but the compute time will take longer. (Default is 20) Integer 10 to 50 (Default: 40)
NumberOfModelDimensions The number of dimensions relates to the number of 'features' the model will try to find within your data. Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. However, too many dimensions will prevent the model from finding correlations between items. Integer 10 to 40 (Default: 20)
ItemCutOffLowerBound Defines the minimum number of usage points an item should be in for it to be considered in the model. Integer 0 to 30 (Default: 20)
ItemCutOffUpperBound Defines the maximum number of usage points an item should be in for it to be considered in the model. Integer 0 to 30 (Default: Not set)
UserCutOffLowerBound Defines the minimum number of transactions a user must have performed to be considered in the model. Integer 0 to 10 (Default: 2)
UserCutOffUpperBound Defines the maximum number of transactions a user must have performed to be considered in the model. Integer 0 to 10 (Default: Not set)
EnableModelingInsights Defines whether offline evaluation should be performed in order to gather modeling insights (i.e. precision and diversity metrics). If set to true, a subset of the data will not be used for training as it will need to be reserved for testing of the model. Read more about offline evaluations Boolean Valid Values: True/False (Default: False)
SplitterStrategy (optional parameter) Either RandomSplitter, DateSplitter or LastEventSplitter. RandomSplitter splits the usage data in train and test sets based on the given randomSplitterParameters test percent and random seed values. LastEventSplitter splits the usage data in train and test sets based on the last transaction for each user. DateSplitter splits the usage data in train and test sets based on a specified date. Read more about offline evaluations String Valid Values: RandomSplitter / LastEventSplitter / DateSplitter (Default: LastEventSplitter)
UseFeaturesInModel Indicates if features can be used in order to enhance the recommendation model. Boolean Valid Values: True/False (Default: True if features in the model)
ModelingFeatureList Comma-separated list of feature names to be used in the recommendation build, in order to enhance the recommendation. If the given list is empty, no features will be used to train the model. String Valid Values: Feature names, up to 512 chars
AllowColdItemPlacement Indicates if the recommendation should also push cold items via feature similarity. Boolean Valid Values: True/False
EnableFeatureCorrelation Indicates if features can be used in reasoning. Boolean Valid Values: True/False
ReasoningFeatureList Comma-separated list of feature names to be used for reasoning sentences (e.g. recommendation explanations). String Valid Values: Feature names, up to 512 chars
EnableU2I Enable personalized recommendation a.k.a. U2I (user to item recommendations). Boolean Valid Values: True/False

FBT Build Parameters

FbtSupportThreshold How conservative the model is. Number of co-occurrences of items to be considered for modeling. Integer Valid Values: 3-50 (default: 6)
FbtMaxItemSetSize Bounds the number of items in a frequent set. Integer Valid Values: 2-3 (default: 2)
FbtMinimalScore Minimal score that a frequent set should have in order to be included in the returned results. The higher the better. Double 0 and above
FbtSimilarityFunction Defines the similarity function to be used by the build. Lift favors serendipity, Co-occurrence favors predictability, and Jaccard is a nice compromise between the two. String cooccurrence, lift, jaccard (default: lift)

SAR Build Parameters

SupportThreshold How conservative the model is. Number of co-occurrences of items to be considered for modeling. Integer Valid Values: 3-50 (default: 6)
SimilarityFunction Defines the similarity function to be used by the build. Lift favors serendipity, Co-occurrence favors predictability, and Jaccard is a nice compromise between the two. String Cooccurrence, Lift, Jaccard (default: Lift)
CooccurrenceUnit Indicates how to group usage events before counting co-occurrences. A 'User' cooccurrence unit will consider all items purchased by the same user as occurring together in the same session. A 'Timestamp' cooccurrence unit will consider all items purchased by the same user in the same time as occurring together in the same session. String Valid values: User / Timestamp (Default: User)
EnableColdItemPlacement Indicates if the recommendation should also push cold items via feature similarity. Boolean Valid Values: True/False (Default: False)
EnableColdToColdRecommendations Indicates whether the similarity between pairs of cold items (catalog items without usage) should be computed. If set to false, only similarity between cold and warm item will be computed, using catalog item features. Note that this configuration is only relevant when enableColdItemPlacement is set to true. Boolean Valid Values: True/False (Default: False)
EnableUserAffinity For user-to-item recommendations, it defines whether the event type and the time of the event should be considered as input into the scoring. Currently this capability is not yet supported, for now set to False. Boolean Valid Values: False
EnablueU2I Enables support for user-to-item recommendations. Boolean Valid Values: True/False (Default: True)
EnableModelingInsights Defines whether offline evaluation should be performed in order to gather modeling insights (i.e. precision and diversity metrics). If set to true, a subset of the data will not be used for training as it will need to be reserved for testing of the model. Read more about offline evaluations Boolean Valid Values: True/False (Default: False)
SplitterStrategy (optional parameter) Either RandomSplitter, DateSplitter or LastEventSplitter. RandomSplitter splits the usage data in train and test sets based on the given randomSplitterParameters test percent and random seed values. LastEventSplitter splits the usage data in train and test sets based on the last transaction for each user. DateSplitter splits the usage data in train and test sets based on a specified date. Read more about offline evaluations String Valid Values: RandomSplitter / LastEventSplitter / DateSplitter (Default: LastEventSplitter)
PopularItemBenchmarkWindow If modeling insights are enabled, the size of the benchmark window (in days) that should be used to for the popular item benchmark. If the value is not provided, the whole usage data is used to compute the most popular items. Int 1 and Above
AllowSeedItemsInRecommendations Defines whether to allow seed items (items in the input or in the user history) to be returned as recommendation results. Boolean Valid Values: True/False (Default: False)
EnableBackfilling Defines whether to backfill recommendation results with popular items when the system does not find sufficient recommendations. Boolean Valid Values: True/False (Default: True)

Rank Build Parameters

NumberOfModelIterations The number of iterations the model performs is reflected by the overall compute time and the model accuracy. The higher the number, the better accuracy you will get, but the compute time will take longer. Integer 10-50
NumberOfModelDimensions The number of dimensions relates to the number of 'features' the model will try to find within your data. Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. However, too many dimensions will prevent the model from finding correlations between items. Integer 10-40
ItemCutOffLowerBound Defines the minimum number of usage points an item should be in for it to be considered in the model. Integer 0-30
ItemCutOffUpperBound Defines the maximum number of usage points an item should be in for it to be considered in the model. Integer Greater than ItemCutOffLowerBound
UserCutOffLowerBound Defines the minimum number of transactions a user must have performed to be considered in the model. Integer 0-10
UserCutOffUpperBound Defines the maximum number of transactions a user must have performed to be considered in the model. Integer Greater than UserCutOffLowerBound


Example:

{
"description": "Simple recomendations build",
"buildType": "recommendation",
"buildParameters": {
"recommendation": {
"numberOfModelIterations": 10,
"numberOfModelDimensions": 40,
"itemCutOffLowerBound": 1,
"itemCutOffUpperBound": 10,
"userCutOffLowerBound": 0,
"userCutOffUpperBound": 0,
"enableModelingInsights": false,
"useFeaturesInModel": false,
"modelingFeatureList": "string",
"allowColdItemPlacement": false,
"enableFeatureCorrelation": true,
"reasoningFeatureList": "string",
"enableU2I": true
}
}
}

Open API testing console

Request URL

Request parameters

string

Unique identifier of the model

Request headers

(optional)
string
Media type of the body sent to the API.
string
Subscription key which provides access to this API. Found in your Cognitive Services accounts.

Request body

Parameters for the build request

{
  "description": "string",
  "buildType": "string",
  "buildParameters": {
    "ranking": {
      "numberOfModelIterations": 0,
      "numberOfModelDimensions": 0,
      "itemCutOffLowerBound": 0,
      "itemCutOffUpperBound": 0,
      "userCutOffLowerBound": 0,
      "userCutOffUpperBound": 0
    },
    "recommendation": {
      "numberOfModelIterations": 0,
      "numberOfModelDimensions": 0,
      "itemCutOffLowerBound": 0,
      "itemCutOffUpperBound": 0,
      "userCutOffLowerBound": 0,
      "userCutOffUpperBound": 0,
      "enableModelingInsights": true,
      "splitterStrategy": "string",
      "randomSplitterParameters": {
        "testPercent": 0,
        "randomSeed": 0
      },
      "dateSplitterParameters": {
        "splitDate": "string"
      },
      "popularItemBenchmarkWindow": 0,
      "useFeaturesInModel": true,
      "modelingFeatureList": "string",
      "allowColdItemPlacement": true,
      "enableFeatureCorrelation": true,
      "reasoningFeatureList": "string",
      "enableU2I": true
    },
    "fbt": {
      "supportThreshold": 0,
      "maxItemSetSize": 0,
      "minimalScore": 0.0,
      "similarityFunction": "string",
      "enableModelingInsights": true,
      "splitterStrategy": "string",
      "randomSplitterParameters": {
        "testPercent": 0,
        "randomSeed": 0
      },
      "dateSplitterParameters": {
        "splitDate": "string"
      },
      "popularItemBenchmarkWindow": 0
    },
    "sar": {
      "supportThreshold": 0,
      "cooccurrenceUnit": "User",
      "similarityFunction": "Jaccard",
      "enableColdItemPlacement": true,
      "enableColdToColdRecommendations": true,
      "enableModelingInsights": true,
      "enableU2I": true,
      "splitterStrategy": "RandomSplitter",
      "randomSplitterParameters": {
        "testPercent": 0,
        "randomSeed": 0
      },
      "dateSplitterParameters": {
        "splitDate": "string"
      },
      "popularItemBenchmarkWindow": 0,
      "enableUserAffinity": true,
      "allowSeedItemsInRecommendations": true,
      "enableBackfilling": true
    }
  }
}
{
  "type": "object",
  "properties": {
    "description": {
      "description": "Build description",
      "type": "string"
    },
    "buildType": {
      "description": "Type of build: Ranking, Recommendation or Fbt",
      "type": "string"
    },
    "buildParameters": {
      "type": "object",
      "properties": {
        "ranking": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Ranking\""
        },
        "recommendation": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "useFeaturesInModel": {
              "description": "Indicates if features can be used in order to enhance the recommendation model.",
              "type": "boolean"
            },
            "modelingFeatureList": {
              "description": "Comma-separated list of feature names to be used during build.",
              "type": "string"
            },
            "allowColdItemPlacement": {
              "description": "Indicates if the recommendation should also push cold items via feature similarity.",
              "type": "boolean"
            },
            "enableFeatureCorrelation": {
              "description": "Indicates if features can be used in reasoning.",
              "type": "boolean"
            },
            "reasoningFeatureList": {
              "description": "Comma-separated list of feature names to be used for reasoning sentences (e.g. recommendation explanations).",
              "type": "string"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"Recommendation\""
        },
        "fbt": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.",
              "type": "integer"
            },
            "maxItemSetSize": {
              "format": "int32",
              "description": "Bound for number of items in a frequent set.",
              "type": "integer"
            },
            "minimalScore": {
              "format": "double",
              "description": "Minimal score that a frequent set should have in order to be included in the returned results.",
              "type": "number"
            },
            "similarityFunction": {
              "description": "Defines the similarity function to be used by the build. \r\n            Lift favors serendipity, Co-occurrence favors predictability, and Jaccard is a nice compromise between the two.",
              "type": "string"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Fbt\""
        },
        "sar": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.\r\n            Value must an integer between 2 and 50. Default is 5.",
              "type": "integer"
            },
            "cooccurrenceUnit": {
              "description": "Indicates how to group usage events before counting co-occurrences.\r\n            Default: <value>CooccurrenceUnits.User</value>",
              "enum": [
                "User",
                "Timestamp"
              ],
              "type": "string"
            },
            "similarityFunction": {
              "description": "The similarity function to use in the model.\r\n            Default: Jaccard",
              "enum": [
                "Jaccard",
                "Concurrence",
                "Lift"
              ],
              "type": "string"
            },
            "enableColdItemPlacement": {
              "description": "Indicates whether to compute similarity of Cold to Warm/Cold Items based on catalog items' features. \r\n            Default: false",
              "type": "boolean"
            },
            "enableColdToColdRecommendations": {
              "description": "Indicates whether the similarity between pairs of cold items (catalog items without usage) should be computed. \r\n            If set to false, only similarity between cold and warm item will be computed, using catalog item features. \r\n            Note that this configuration is only relevant when enableColdItemSupport is set to true.\r\n            Default: false",
              "type": "boolean"
            },
            "enableModelingInsights": {
              "description": "Indicates whether to enable metrics computation for the model.\r\n            Default: false",
              "type": "boolean"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            Note that this configuration is only relevant when enableModelingInsights is set to true.",
              "enum": [
                "RandomSplitter",
                "LastEventSplitter",
                "DateSplitter"
              ],
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter.\r\n            Note that this configuration is only relevant when splitterStrategy is set to RandomSplitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "enableUserAffinity": {
              "description": "For future use - Allows recommendations to use timestamps and event types.\r\n            Default: false",
              "type": "boolean"
            },
            "allowSeedItemsInRecommendations": {
              "description": "Allow seed items (items in the input or in the user history) to be returned as recommendation results.\r\n            Default: false",
              "type": "boolean"
            },
            "enableBackfilling": {
              "description": "Backfill with popular items when the system does not find sufficient recommendations.\r\n            Default: true",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"SAR\""
        }
      },
      "description": "Parameters for build"
    }
  }
}
{
  "description": "string",
  "buildType": "string",
  "buildParameters": {
    "ranking": {
      "numberOfModelIterations": 0,
      "numberOfModelDimensions": 0,
      "itemCutOffLowerBound": 0,
      "itemCutOffUpperBound": 0,
      "userCutOffLowerBound": 0,
      "userCutOffUpperBound": 0
    },
    "recommendation": {
      "numberOfModelIterations": 0,
      "numberOfModelDimensions": 0,
      "itemCutOffLowerBound": 0,
      "itemCutOffUpperBound": 0,
      "userCutOffLowerBound": 0,
      "userCutOffUpperBound": 0,
      "enableModelingInsights": true,
      "splitterStrategy": "string",
      "randomSplitterParameters": {
        "testPercent": 0,
        "randomSeed": 0
      },
      "dateSplitterParameters": {
        "splitDate": "string"
      },
      "popularItemBenchmarkWindow": 0,
      "useFeaturesInModel": true,
      "modelingFeatureList": "string",
      "allowColdItemPlacement": true,
      "enableFeatureCorrelation": true,
      "reasoningFeatureList": "string",
      "enableU2I": true
    },
    "fbt": {
      "supportThreshold": 0,
      "maxItemSetSize": 0,
      "minimalScore": 0.0,
      "similarityFunction": "string",
      "enableModelingInsights": true,
      "splitterStrategy": "string",
      "randomSplitterParameters": {
        "testPercent": 0,
        "randomSeed": 0
      },
      "dateSplitterParameters": {
        "splitDate": "string"
      },
      "popularItemBenchmarkWindow": 0
    },
    "sar": {
      "supportThreshold": 0,
      "cooccurrenceUnit": "User",
      "similarityFunction": "Jaccard",
      "enableColdItemPlacement": true,
      "enableColdToColdRecommendations": true,
      "enableModelingInsights": true,
      "enableU2I": true,
      "splitterStrategy": "RandomSplitter",
      "randomSplitterParameters": {
        "testPercent": 0,
        "randomSeed": 0
      },
      "dateSplitterParameters": {
        "splitDate": "string"
      },
      "popularItemBenchmarkWindow": 0,
      "enableUserAffinity": true,
      "allowSeedItemsInRecommendations": true,
      "enableBackfilling": true
    }
  }
}
{
  "type": "object",
  "properties": {
    "description": {
      "description": "Build description",
      "type": "string"
    },
    "buildType": {
      "description": "Type of build: Ranking, Recommendation or Fbt",
      "type": "string"
    },
    "buildParameters": {
      "type": "object",
      "properties": {
        "ranking": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Ranking\""
        },
        "recommendation": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "useFeaturesInModel": {
              "description": "Indicates if features can be used in order to enhance the recommendation model.",
              "type": "boolean"
            },
            "modelingFeatureList": {
              "description": "Comma-separated list of feature names to be used during build.",
              "type": "string"
            },
            "allowColdItemPlacement": {
              "description": "Indicates if the recommendation should also push cold items via feature similarity.",
              "type": "boolean"
            },
            "enableFeatureCorrelation": {
              "description": "Indicates if features can be used in reasoning.",
              "type": "boolean"
            },
            "reasoningFeatureList": {
              "description": "Comma-separated list of feature names to be used for reasoning sentences (e.g. recommendation explanations).",
              "type": "string"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"Recommendation\""
        },
        "fbt": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.",
              "type": "integer"
            },
            "maxItemSetSize": {
              "format": "int32",
              "description": "Bound for number of items in a frequent set.",
              "type": "integer"
            },
            "minimalScore": {
              "format": "double",
              "description": "Minimal score that a frequent set should have in order to be included in the returned results.",
              "type": "number"
            },
            "similarityFunction": {
              "description": "Defines the similarity function to be used by the build. \r\n            Lift favors serendipity, Co-occurrence favors predictability, and Jaccard is a nice compromise between the two.",
              "type": "string"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Fbt\""
        },
        "sar": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.\r\n            Value must an integer between 2 and 50. Default is 5.",
              "type": "integer"
            },
            "cooccurrenceUnit": {
              "description": "Indicates how to group usage events before counting co-occurrences.\r\n            Default: <value>CooccurrenceUnits.User</value>",
              "enum": [
                "User",
                "Timestamp"
              ],
              "type": "string"
            },
            "similarityFunction": {
              "description": "The similarity function to use in the model.\r\n            Default: Jaccard",
              "enum": [
                "Jaccard",
                "Concurrence",
                "Lift"
              ],
              "type": "string"
            },
            "enableColdItemPlacement": {
              "description": "Indicates whether to compute similarity of Cold to Warm/Cold Items based on catalog items' features. \r\n            Default: false",
              "type": "boolean"
            },
            "enableColdToColdRecommendations": {
              "description": "Indicates whether the similarity between pairs of cold items (catalog items without usage) should be computed. \r\n            If set to false, only similarity between cold and warm item will be computed, using catalog item features. \r\n            Note that this configuration is only relevant when enableColdItemSupport is set to true.\r\n            Default: false",
              "type": "boolean"
            },
            "enableModelingInsights": {
              "description": "Indicates whether to enable metrics computation for the model.\r\n            Default: false",
              "type": "boolean"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            Note that this configuration is only relevant when enableModelingInsights is set to true.",
              "enum": [
                "RandomSplitter",
                "LastEventSplitter",
                "DateSplitter"
              ],
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter.\r\n            Note that this configuration is only relevant when splitterStrategy is set to RandomSplitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "enableUserAffinity": {
              "description": "For future use - Allows recommendations to use timestamps and event types.\r\n            Default: false",
              "type": "boolean"
            },
            "allowSeedItemsInRecommendations": {
              "description": "Allow seed items (items in the input or in the user history) to be returned as recommendation results.\r\n            Default: false",
              "type": "boolean"
            },
            "enableBackfilling": {
              "description": "Backfill with popular items when the system does not find sufficient recommendations.\r\n            Default: true",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"SAR\""
        }
      },
      "description": "Parameters for build"
    }
  }
}
<BuildRequestInfo>
  <description>string</description>
  <buildType>string</buildType>
  <buildParameters>
    <ranking>
      <numberOfModelIterations>0</numberOfModelIterations>
      <numberOfModelDimensions>0</numberOfModelDimensions>
      <itemCutOffLowerBound>0</itemCutOffLowerBound>
      <itemCutOffUpperBound>0</itemCutOffUpperBound>
      <userCutOffLowerBound>0</userCutOffLowerBound>
      <userCutOffUpperBound>0</userCutOffUpperBound>
    </ranking>
    <recommendation>
      <numberOfModelIterations>0</numberOfModelIterations>
      <numberOfModelDimensions>0</numberOfModelDimensions>
      <itemCutOffLowerBound>0</itemCutOffLowerBound>
      <itemCutOffUpperBound>0</itemCutOffUpperBound>
      <userCutOffLowerBound>0</userCutOffLowerBound>
      <userCutOffUpperBound>0</userCutOffUpperBound>
      <enableModelingInsights>true</enableModelingInsights>
      <splitterStrategy>string</splitterStrategy>
      <randomSplitterParameters>
        <testPercent>0</testPercent>
        <randomSeed>0</randomSeed>
      </randomSplitterParameters>
      <dateSplitterParameters>
        <splitDate>string</splitDate>
      </dateSplitterParameters>
      <popularItemBenchmarkWindow>0</popularItemBenchmarkWindow>
      <useFeaturesInModel>true</useFeaturesInModel>
      <modelingFeatureList>string</modelingFeatureList>
      <allowColdItemPlacement>true</allowColdItemPlacement>
      <enableFeatureCorrelation>true</enableFeatureCorrelation>
      <reasoningFeatureList>string</reasoningFeatureList>
      <enableU2I>true</enableU2I>
    </recommendation>
    <fbt>
      <supportThreshold>0</supportThreshold>
      <maxItemSetSize>0</maxItemSetSize>
      <minimalScore>0</minimalScore>
      <similarityFunction>string</similarityFunction>
      <enableModelingInsights>true</enableModelingInsights>
      <splitterStrategy>string</splitterStrategy>
      <randomSplitterParameters>
        <testPercent>0</testPercent>
        <randomSeed>0</randomSeed>
      </randomSplitterParameters>
      <dateSplitterParameters>
        <splitDate>string</splitDate>
      </dateSplitterParameters>
      <popularItemBenchmarkWindow>0</popularItemBenchmarkWindow>
    </fbt>
    <sar>
      <supportThreshold>0</supportThreshold>
      <cooccurrenceUnit>User</cooccurrenceUnit>
      <similarityFunction>Jaccard</similarityFunction>
      <enableColdItemPlacement>true</enableColdItemPlacement>
      <enableColdToColdRecommendations>true</enableColdToColdRecommendations>
      <enableModelingInsights>true</enableModelingInsights>
      <enableU2I>true</enableU2I>
      <splitterStrategy>RandomSplitter</splitterStrategy>
      <randomSplitterParameters>
        <testPercent>0</testPercent>
        <randomSeed>0</randomSeed>
      </randomSplitterParameters>
      <dateSplitterParameters>
        <splitDate>string</splitDate>
      </dateSplitterParameters>
      <popularItemBenchmarkWindow>0</popularItemBenchmarkWindow>
      <enableUserAffinity>true</enableUserAffinity>
      <allowSeedItemsInRecommendations>true</allowSeedItemsInRecommendations>
      <enableBackfilling>true</enableBackfilling>
    </sar>
  </buildParameters>
</BuildRequestInfo>
{
  "type": "object",
  "properties": {
    "description": {
      "description": "Build description",
      "type": "string"
    },
    "buildType": {
      "description": "Type of build: Ranking, Recommendation or Fbt",
      "type": "string"
    },
    "buildParameters": {
      "type": "object",
      "properties": {
        "ranking": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Ranking\""
        },
        "recommendation": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "useFeaturesInModel": {
              "description": "Indicates if features can be used in order to enhance the recommendation model.",
              "type": "boolean"
            },
            "modelingFeatureList": {
              "description": "Comma-separated list of feature names to be used during build.",
              "type": "string"
            },
            "allowColdItemPlacement": {
              "description": "Indicates if the recommendation should also push cold items via feature similarity.",
              "type": "boolean"
            },
            "enableFeatureCorrelation": {
              "description": "Indicates if features can be used in reasoning.",
              "type": "boolean"
            },
            "reasoningFeatureList": {
              "description": "Comma-separated list of feature names to be used for reasoning sentences (e.g. recommendation explanations).",
              "type": "string"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"Recommendation\""
        },
        "fbt": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.",
              "type": "integer"
            },
            "maxItemSetSize": {
              "format": "int32",
              "description": "Bound for number of items in a frequent set.",
              "type": "integer"
            },
            "minimalScore": {
              "format": "double",
              "description": "Minimal score that a frequent set should have in order to be included in the returned results.",
              "type": "number"
            },
            "similarityFunction": {
              "description": "Defines the similarity function to be used by the build. \r\n            Lift favors serendipity, Co-occurrence favors predictability, and Jaccard is a nice compromise between the two.",
              "type": "string"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Fbt\""
        },
        "sar": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.\r\n            Value must an integer between 2 and 50. Default is 5.",
              "type": "integer"
            },
            "cooccurrenceUnit": {
              "description": "Indicates how to group usage events before counting co-occurrences.\r\n            Default: <value>CooccurrenceUnits.User</value>",
              "enum": [
                "User",
                "Timestamp"
              ],
              "type": "string"
            },
            "similarityFunction": {
              "description": "The similarity function to use in the model.\r\n            Default: Jaccard",
              "enum": [
                "Jaccard",
                "Concurrence",
                "Lift"
              ],
              "type": "string"
            },
            "enableColdItemPlacement": {
              "description": "Indicates whether to compute similarity of Cold to Warm/Cold Items based on catalog items' features. \r\n            Default: false",
              "type": "boolean"
            },
            "enableColdToColdRecommendations": {
              "description": "Indicates whether the similarity between pairs of cold items (catalog items without usage) should be computed. \r\n            If set to false, only similarity between cold and warm item will be computed, using catalog item features. \r\n            Note that this configuration is only relevant when enableColdItemSupport is set to true.\r\n            Default: false",
              "type": "boolean"
            },
            "enableModelingInsights": {
              "description": "Indicates whether to enable metrics computation for the model.\r\n            Default: false",
              "type": "boolean"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            Note that this configuration is only relevant when enableModelingInsights is set to true.",
              "enum": [
                "RandomSplitter",
                "LastEventSplitter",
                "DateSplitter"
              ],
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter.\r\n            Note that this configuration is only relevant when splitterStrategy is set to RandomSplitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "enableUserAffinity": {
              "description": "For future use - Allows recommendations to use timestamps and event types.\r\n            Default: false",
              "type": "boolean"
            },
            "allowSeedItemsInRecommendations": {
              "description": "Allow seed items (items in the input or in the user history) to be returned as recommendation results.\r\n            Default: false",
              "type": "boolean"
            },
            "enableBackfilling": {
              "description": "Backfill with popular items when the system does not find sufficient recommendations.\r\n            Default: true",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"SAR\""
        }
      },
      "description": "Parameters for build"
    }
  }
}
<BuildRequestInfo>
  <description>string</description>
  <buildType>string</buildType>
  <buildParameters>
    <ranking>
      <numberOfModelIterations>0</numberOfModelIterations>
      <numberOfModelDimensions>0</numberOfModelDimensions>
      <itemCutOffLowerBound>0</itemCutOffLowerBound>
      <itemCutOffUpperBound>0</itemCutOffUpperBound>
      <userCutOffLowerBound>0</userCutOffLowerBound>
      <userCutOffUpperBound>0</userCutOffUpperBound>
    </ranking>
    <recommendation>
      <numberOfModelIterations>0</numberOfModelIterations>
      <numberOfModelDimensions>0</numberOfModelDimensions>
      <itemCutOffLowerBound>0</itemCutOffLowerBound>
      <itemCutOffUpperBound>0</itemCutOffUpperBound>
      <userCutOffLowerBound>0</userCutOffLowerBound>
      <userCutOffUpperBound>0</userCutOffUpperBound>
      <enableModelingInsights>true</enableModelingInsights>
      <splitterStrategy>string</splitterStrategy>
      <randomSplitterParameters>
        <testPercent>0</testPercent>
        <randomSeed>0</randomSeed>
      </randomSplitterParameters>
      <dateSplitterParameters>
        <splitDate>string</splitDate>
      </dateSplitterParameters>
      <popularItemBenchmarkWindow>0</popularItemBenchmarkWindow>
      <useFeaturesInModel>true</useFeaturesInModel>
      <modelingFeatureList>string</modelingFeatureList>
      <allowColdItemPlacement>true</allowColdItemPlacement>
      <enableFeatureCorrelation>true</enableFeatureCorrelation>
      <reasoningFeatureList>string</reasoningFeatureList>
      <enableU2I>true</enableU2I>
    </recommendation>
    <fbt>
      <supportThreshold>0</supportThreshold>
      <maxItemSetSize>0</maxItemSetSize>
      <minimalScore>0</minimalScore>
      <similarityFunction>string</similarityFunction>
      <enableModelingInsights>true</enableModelingInsights>
      <splitterStrategy>string</splitterStrategy>
      <randomSplitterParameters>
        <testPercent>0</testPercent>
        <randomSeed>0</randomSeed>
      </randomSplitterParameters>
      <dateSplitterParameters>
        <splitDate>string</splitDate>
      </dateSplitterParameters>
      <popularItemBenchmarkWindow>0</popularItemBenchmarkWindow>
    </fbt>
    <sar>
      <supportThreshold>0</supportThreshold>
      <cooccurrenceUnit>User</cooccurrenceUnit>
      <similarityFunction>Jaccard</similarityFunction>
      <enableColdItemPlacement>true</enableColdItemPlacement>
      <enableColdToColdRecommendations>true</enableColdToColdRecommendations>
      <enableModelingInsights>true</enableModelingInsights>
      <enableU2I>true</enableU2I>
      <splitterStrategy>RandomSplitter</splitterStrategy>
      <randomSplitterParameters>
        <testPercent>0</testPercent>
        <randomSeed>0</randomSeed>
      </randomSplitterParameters>
      <dateSplitterParameters>
        <splitDate>string</splitDate>
      </dateSplitterParameters>
      <popularItemBenchmarkWindow>0</popularItemBenchmarkWindow>
      <enableUserAffinity>true</enableUserAffinity>
      <allowSeedItemsInRecommendations>true</allowSeedItemsInRecommendations>
      <enableBackfilling>true</enableBackfilling>
    </sar>
  </buildParameters>
</BuildRequestInfo>
{
  "type": "object",
  "properties": {
    "description": {
      "description": "Build description",
      "type": "string"
    },
    "buildType": {
      "description": "Type of build: Ranking, Recommendation or Fbt",
      "type": "string"
    },
    "buildParameters": {
      "type": "object",
      "properties": {
        "ranking": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Ranking\""
        },
        "recommendation": {
          "type": "object",
          "properties": {
            "numberOfModelIterations": {
              "format": "int32",
              "description": "The number of iterations the model performs. \r\n            The higher the number, the better accuracy, but compute time will be higher.",
              "type": "integer"
            },
            "numberOfModelDimensions": {
              "format": "int32",
              "description": "The number of dimensions relates to the number of 'features' the model will try to find within your data. \r\n            Increasing the number of dimensions will allow better fine-tuning of the results into smaller clusters. \r\n            However, too many dimensions will prevent the model from finding correlations between items.",
              "type": "integer"
            },
            "itemCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the item lower bound for usage condenser.",
              "type": "integer"
            },
            "itemCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the item upper bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffLowerBound": {
              "format": "int32",
              "description": "Defines the user lower bound for usage condenser.",
              "type": "integer"
            },
            "userCutOffUpperBound": {
              "format": "int32",
              "description": "Defines the user upper bound for usage condenser.",
              "type": "integer"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "useFeaturesInModel": {
              "description": "Indicates if features can be used in order to enhance the recommendation model.",
              "type": "boolean"
            },
            "modelingFeatureList": {
              "description": "Comma-separated list of feature names to be used during build.",
              "type": "string"
            },
            "allowColdItemPlacement": {
              "description": "Indicates if the recommendation should also push cold items via feature similarity.",
              "type": "boolean"
            },
            "enableFeatureCorrelation": {
              "description": "Indicates if features can be used in reasoning.",
              "type": "boolean"
            },
            "reasoningFeatureList": {
              "description": "Comma-separated list of feature names to be used for reasoning sentences (e.g. recommendation explanations).",
              "type": "string"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"Recommendation\""
        },
        "fbt": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.",
              "type": "integer"
            },
            "maxItemSetSize": {
              "format": "int32",
              "description": "Bound for number of items in a frequent set.",
              "type": "integer"
            },
            "minimalScore": {
              "format": "double",
              "description": "Minimal score that a frequent set should have in order to be included in the returned results.",
              "type": "number"
            },
            "similarityFunction": {
              "description": "Defines the similarity function to be used by the build. \r\n            Lift favors serendipity, Co-occurrence favors predictability, and Jaccard is a nice compromise between the two.",
              "type": "string"
            },
            "enableModelingInsights": {
              "description": "Enable or disable metrics computation for the model.",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            RandomSplitter splits the usage data in train and test sets based on the given\r\n            randomSplitterParameters value.\r\n            LastEventSplitter splits the usage data in train and test sets based on the last\r\n            transaction for a each user.",
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            }
          },
          "description": "Build parameters for build of type \"Fbt\""
        },
        "sar": {
          "type": "object",
          "properties": {
            "supportThreshold": {
              "format": "int32",
              "description": "Number of co-occurrences of items to be considered for modeling.\r\n            Value must an integer between 2 and 50. Default is 5.",
              "type": "integer"
            },
            "cooccurrenceUnit": {
              "description": "Indicates how to group usage events before counting co-occurrences.\r\n            Default: <value>CooccurrenceUnits.User</value>",
              "enum": [
                "User",
                "Timestamp"
              ],
              "type": "string"
            },
            "similarityFunction": {
              "description": "The similarity function to use in the model.\r\n            Default: Jaccard",
              "enum": [
                "Jaccard",
                "Concurrence",
                "Lift"
              ],
              "type": "string"
            },
            "enableColdItemPlacement": {
              "description": "Indicates whether to compute similarity of Cold to Warm/Cold Items based on catalog items' features. \r\n            Default: false",
              "type": "boolean"
            },
            "enableColdToColdRecommendations": {
              "description": "Indicates whether the similarity between pairs of cold items (catalog items without usage) should be computed. \r\n            If set to false, only similarity between cold and warm item will be computed, using catalog item features. \r\n            Note that this configuration is only relevant when enableColdItemSupport is set to true.\r\n            Default: false",
              "type": "boolean"
            },
            "enableModelingInsights": {
              "description": "Indicates whether to enable metrics computation for the model.\r\n            Default: false",
              "type": "boolean"
            },
            "enableU2I": {
              "description": "Allow the personalized recommendation a.k.a. U2I (user to item recommendations).",
              "type": "boolean"
            },
            "splitterStrategy": {
              "description": "Defines the splitter strategy to be used by the build.\r\n            Note that this configuration is only relevant when enableModelingInsights is set to true.",
              "enum": [
                "RandomSplitter",
                "LastEventSplitter",
                "DateSplitter"
              ],
              "type": "string"
            },
            "randomSplitterParameters": {
              "type": "object",
              "properties": {
                "testPercent": {
                  "format": "int32",
                  "description": "The percentage of data from the usage file that will be put in the test set\r\n            during splitting.",
                  "type": "integer"
                },
                "randomSeed": {
                  "format": "int32",
                  "description": "Number used to calculate the startig value of random sequence based on which\r\n            test set data is selected.",
                  "type": "integer"
                }
              },
              "description": "Specifies the parameters to be used for random splitter.\r\n            Note that this configuration is only relevant when splitterStrategy is set to RandomSplitter."
            },
            "dateSplitterParameters": {
              "type": "object",
              "properties": {
                "splitDate": {
                  "format": "date-time",
                  "description": "The split date at which the usage file data is put in the test set\r\n            during splitting.",
                  "type": "string"
                }
              },
              "description": "Specifies the parameters to be used for date splitter."
            },
            "popularItemBenchmarkWindow": {
              "format": "int32",
              "description": "Specifies the parameters to be used for computing popular items for modeling insights. (in number of days)",
              "type": "integer"
            },
            "enableUserAffinity": {
              "description": "For future use - Allows recommendations to use timestamps and event types.\r\n            Default: false",
              "type": "boolean"
            },
            "allowSeedItemsInRecommendations": {
              "description": "Allow seed items (items in the input or in the user history) to be returned as recommendation results.\r\n            Default: false",
              "type": "boolean"
            },
            "enableBackfilling": {
              "description": "Backfill with popular items when the system does not find sufficient recommendations.\r\n            Default: true",
              "type": "boolean"
            }
          },
          "description": "Build parameters for build of type \"SAR\""
        }
      },
      "description": "Parameters for build"
    }
  }
}

Response 202

Accepted. The Operation-Location header can be used to query the status of the build. See Retrieve the status of an operation API.

{
  "buildId": 0
}
{
  "type": "object",
  "properties": {
    "buildId": {
      "format": "int64",
      "description": "Unique build identifier",
      "type": "integer"
    }
  }
}
{
  "buildId": 0
}
{
  "type": "object",
  "properties": {
    "buildId": {
      "format": "int64",
      "description": "Unique build identifier",
      "type": "integer"
    }
  }
}
<BuildModelResponse>
  <buildId>0</buildId>
</BuildModelResponse>
{
  "type": "object",
  "properties": {
    "buildId": {
      "format": "int64",
      "description": "Unique build identifier",
      "type": "integer"
    }
  }
}
<BuildModelResponse>
  <buildId>0</buildId>
</BuildModelResponse>
{
  "type": "object",
  "properties": {
    "buildId": {
      "format": "int64",
      "description": "Unique build identifier",
      "type": "integer"
    }
  }
}

Response 400

Code samples

@ECHO OFF

curl -v -X POST "https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds"
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds?" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
               content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
               response = await client.PostAsync(uri, content);
            }

        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds");


            URI uri = builder.build();
            HttpPost request = new HttpPost(uri);
            request.setHeader("Content-Type", "application/json");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "POST",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"POST"];
    // Request headers
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Content-Type' => 'application/json',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_POST);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('westus.api.cognitive.microsoft.com')
    conn.request("POST", "/recommendations/v4.0/models/{modelId}/builds?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('westus.api.cognitive.microsoft.com')
    conn.request("POST", "/recommendations/v4.0/models/{modelId}/builds?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://westus.api.cognitive.microsoft.com/recommendations/v4.0/models/{modelId}/builds')
uri.query = URI.encode_www_form({
})

request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body