Creates one or more deal records in the Carta CRM via the public API. Use this skill when the user says things like "add a deal", "create a deal", "log a deal", "add deal to CRM", "add deal to Carta CRM", or "/add-deal". Collects deal information conversationally, then POSTs it to the Carta CRM API.
Help the user create one or more deal records in the Carta CRM by calling
POST /v1/deals. First fetch available pipelines and custom fields, then collect
deal details conversationally, and make the API call using curl.
echo "API_KEY=${LISTALPHA_API_KEY:+set}"
If LISTALPHA_API_KEY is missing, tell the user:
"You need to set the
LISTALPHA_API_KEYenvironment variable to your Carta CRM API key before using this skill. You can add it in Claude's environment settings."
Call the pipelines endpoint so the user can pick a pipeline and stage by name:
curl -s -X GET "https://api.listalpha.com/v1/deals/pipelines" \
-H "Authorization: ${LISTALPHA_API_KEY}"
The response shape is:
{
"pipelines": [
{ "id": "...", "name": "...", "stages": [{ "id": "...", "name": "..." }] }
]
}
Present the pipeline and stage names to the user. If the call fails, proceed without it.
curl -s -X GET "https://api.listalpha.com/v1/deals/custom-fields" \
-H "Authorization: ${LISTALPHA_API_KEY}"
Use returned field names as hints when collecting deal data. If the call fails, proceed without it.
Ask the user for:
If the user has already provided details in their message, extract them directly without re-asking.
Build the request body, omitting any fields the user did not provide:
{
"pipelineId": "<pipeline id>",
"stageId": "<stage id>",
"company": {
"name": "<company name>",
"url": "<company url>"
},
"comment": "<comment>",
"tags": ["<tag1>", "<tag2>"],
"dealLead": "<user id>",
"addedAt": "<ISO 8601 date>",
"fields": {
"<field_key>": "<value>"
}
}
Omit company if neither name nor URL was provided. Omit fields if no custom
field data was provided.
Make the API call:
curl -s -X POST "https://api.listalpha.com/v1/deals" \
-H "Authorization: ${LISTALPHA_API_KEY}" \
-H "Content-Type: application/json" \
-d '<json_body>'
On success (HTTP 200), respond with:
"Deal created successfully (ID:
{id})."
If a company name is available, include it:
"Deal for {company name} created successfully (ID:
{id})."
On error, show the status code and error message from the response, and suggest fixes:
If the user wants to add multiple deals at once, repeat Steps 4–6 for each one. After all are done, summarize:
"Created N deals: [list of company names with IDs]"
See references/api-reference.md for endpoint details and field schema.