What the model is told
Create a new deal in HubSpot for a customer who has asked for a quote or to buy. You need the contact's record ID, so use Find HubSpot Contact first. Confirm the deal name and amount with the customer. Returns the new deal, including its ID.
Request
POSThttps://api.hubapi.com/crm/v3/objects/deals
Headers
Content-Typeapplication/jsonAuthorizationBearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN
Body
{
"properties": {
"dealname": "{{dealName}}",
"amount": "{{amount}}",
"dealstage": "YOUR_DEAL_STAGE_ID"
},
"associations": [
{
"to": {
"id": "{{contactId}}"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 3
}
]
}
]
}Parameters
dealName stringA short name for the deal.amount stringThe deal value as a number with no currency symbol.contactId stringThe HubSpot record ID of the contact, from Find HubSpot Contact.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "2d2f2dbd-bc97-48f0-aae8-22e8862f8821",
"type": "HTTP_REQUEST",
"label": "Create HubSpot Deal",
"name": "create_hubspot_deal",
"customName": false,
"description": "Create a new deal in HubSpot for a customer who has asked for a quote or to buy. You need the contact's record ID, so use Find HubSpot Contact first. Confirm the deal name and amount with the customer. Returns the new deal, including its ID.",
"parameters": [
{
"name": "dealName",
"type": "string",
"description": "A short name for the deal."
},
{
"name": "amount",
"type": "string",
"description": "The deal value as a number with no currency symbol."
},
{
"name": "contactId",
"type": "string",
"description": "The HubSpot record ID of the contact, from Find HubSpot Contact."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://api.hubapi.com/crm/v3/objects/deals"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN"
}
],
"body": "{\n \"properties\": {\n \"dealname\": \"{{dealName}}\",\n \"amount\": \"{{amount}}\",\n \"dealstage\": \"YOUR_DEAL_STAGE_ID\"\n },\n \"associations\": [\n {\n \"to\": {\n \"id\": \"{{contactId}}\"\n },\n \"types\": [\n {\n \"associationCategory\": \"HUBSPOT_DEFINED\",\n \"associationTypeId\": 3\n }\n ]\n }\n ]\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.