Skip to content

Get Recommendation

POST/v1/core/entities/{id}/recommend

Generates a behavioral recommendation based on historical interaction data.

WARNING

This API is restricted to the Builder and Enterprise billing tiers.

Request

json
{
  "intent": "payment_recovery",
  "lookback_days": 90,
  "min_success_count": 1,
  "agent_id": "billing-bot-v2"
}

Parameters

NameTypeRequiredDescription
idstringYes(In Path) The Entity UUID
intentstringYesOptionally filter history by a specific intent
lookback_daysintegerNoDefault: 90
min_success_countintegerNoMinimum successes required for a confident recommendation (Default: 1)

Response

json
{
  "recommendation_id": "rec_01A2B3C",
  "entity_id": "ent_550e...",
  "intent": "payment_recovery",
  "lookback_days": 90,
  "data_sufficient": true,
  "confidence_score": 0.85,
  "primary": {
    "api": "sendgrid",
    "action_type": "send_email",
    "raw_success_rate": 0.85,
    "success_count": 17,
    "total_count": 20,
    "composite_score": 0.85,
    "is_primary": true
  },
  "opportunity_set": [
    {
      "api": "sendgrid",
      "action_type": "send_email",
      "composite_score": 0.85
    },
    {
      "api": "twilio",
      "action_type": "send_sms",
      "composite_score": 0.05
    }
  ]
}

Released under the MIT License.