Référence MCP
preview_segment
Prévisualiser un segment
Rôle#
Compte et dix premiers contacts d'une définition de segment (le même compilateur que l'écran) sans rien écrire : pour vérifier des critères avant create_segment. Une définition invalide est refusée avec son motif.
Accès#
Scope principal : marketing:read. Le scope ne remplace pas les gardes de visibilité, d'organisation, de module ni les scopes complémentaires des gestes composés.
Catalogue complet · Approbations
Paramètres#
Le schéma ci-dessous est produit par la fonction qui enregistre les outils, y compris idempotency_key lorsqu'elle s'applique. Consultez les objets imbriqués dans le schéma complet.
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
object | string | Non | Valeurs : contact, company |
definition | object | Oui |
Schéma JSON complet des paramètres
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"object": {
"type": "string",
"enum": [
"contact",
"company"
]
},
"definition": {
"type": "object",
"properties": {
"contactable": {
"default": true,
"type": "boolean"
},
"all": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"enum": [
"contact",
"company",
"affiliation",
"quote",
"order",
"contract",
"invoice",
"sales_activity",
"marketing_consent",
"marketing_delivery",
"event_invitation",
"marketing_touch",
"tag"
]
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"op": {
"type": "string",
"enum": [
"is",
"is_not",
"contains",
"gt",
"lt",
"between",
"in",
"empty",
"not_empty",
"within_days",
"older_than_days"
]
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
}
]
},
"not": {
"type": "boolean"
}
},
"required": [
"object",
"field",
"op"
]
}
},
"anyGroups": {
"default": [],
"maxItems": 5,
"type": "array",
"items": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"enum": [
"contact",
"company",
"affiliation",
"quote",
"order",
"contract",
"invoice",
"sales_activity",
"marketing_consent",
"marketing_delivery",
"event_invitation",
"marketing_touch",
"tag"
]
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"op": {
"type": "string",
"enum": [
"is",
"is_not",
"contains",
"gt",
"lt",
"between",
"in",
"empty",
"not_empty",
"within_days",
"older_than_days"
]
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
}
]
},
"not": {
"type": "boolean"
}
},
"required": [
"object",
"field",
"op"
]
}
}
}
}
}
},
"required": [
"definition"
],
"additionalProperties": false
}