HappierleadsDocs
MCP server

create_lead_scoring_model

Create a lead scoring model on a website, with its rules: criteria (same shape as get_lead_scoring_model / update_lead_scoring_model), active and aiMatching are saved with it.

Create a lead scoring model · Changes data

Create a lead scoring model on a website, with its rules: criteria (same shape as get_lead_scoring_model / update_lead_scoring_model), active and aiMatching are saved with it. Leave criteria out to start with an empty model and add rules later with update_lead_scoring_model. Names must be unique per website (case-insensitive). To have AI build a model from your website instead, use ai_generate_scoring_model. websiteId comes from list_websites. Returns the saved model with its _id. If the model was created but its rules could not be saved, the result is an error with modelId and a note to retry with update_lead_scoring_model.

ConnectionAccount URL, team member URL or OAuth

Parameters

ParameterTypeRequiredDescription
websiteIdstringYesWebsite id (24 hex characters) from list_websites.
namestringYesModel name, unique on the website, e.g. "Enterprise SaaS".
activebooleanNotrue (default) to score leads with it straight away, false to save it switched off.
criteriaobjectNoRules keyed by criterion, in the shape get_lead_scoring_model returns (industry, employees, revenue, jobTitle, pageVisited, …), e.g. {"industry":[{"values":["Software"],"score":8,"filter":"any"}]}.
aiMatchingobjectNoAI matching settings, in the shape get_lead_scoring_model returns.

Tool definition

What your assistant receives from tools/list:

{
  "name": "create_lead_scoring_model",
  "title": "Create a lead scoring model",
  "annotations": {
    "title": "Create a lead scoring model",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "inputSchema": {
    "type": "object",
    "properties": {
      "websiteId": {
        "type": "string",
        "description": "Website id (24 hex characters) from list_websites."
      },
      "name": {
        "type": "string",
        "description": "Model name, unique on the website, e.g. \"Enterprise SaaS\"."
      },
      "active": {
        "type": "boolean",
        "description": "true (default) to score leads with it straight away, false to save it switched off."
      },
      "criteria": {
        "type": "object",
        "description": "Rules keyed by criterion, in the shape get_lead_scoring_model returns (industry, employees, revenue, jobTitle, pageVisited, …), e.g. {\"industry\":[{\"values\":[\"Software\"],\"score\":8,\"filter\":\"any\"}]}."
      },
      "aiMatching": {
        "type": "object",
        "description": "AI matching settings, in the shape get_lead_scoring_model returns."
      }
    },
    "required": [
      "websiteId",
      "name"
    ]
  }
}

On this page