Voiceflow Integration
Integrate Sticky Calls API with Voiceflow for AI voice agents with caller memory.
Quick Start
Time: 5 minutes Difficulty: Very Easy
Step 1: Add API Block
- Open your Voiceflow project
- Drag API block onto canvas
- Configure:
- Method: POST
- URL:
https://api.stickycalls.com/v1/calls/start - Headers:
Authorization:Bearer YOUR_API_KEYContent-Type:application/json
Step 2: Configure Request
Body:
{
"call_id": "{{{system.timestamp}}}_{{{system.sessionID}}}",
"identity_hints": {
"ani": "{{{caller_phone}}}",
"external_ids": {
"session_id": "{{{system.sessionID}}}"
}
}
}
Variables:
- Create variable:
caller_phone(set at call start)
Step 3: Parse Response
Variable Mapping:
| Voiceflow Variable | API Response Path |
|---|---|
customer_ref | customer_ref |
confidence | identity.confidence |
recommendation | identity.recommendation |
caller_name | variables.name.value |
open_issues | open_intents[0].intent |
Step 4: Conditional Logic
Add IF block:
IF {confidence} >= 0.7
THEN:
Speak: "Welcome back {caller_name}! How can I help you today?"
ELSE:
Speak: "Welcome! How can I help you today?"
Step 5: Save Context
At end of conversation:
- Add API block
- Configure:
- Method: POST
- URL:
https://api.stickycalls.com/v1/calls/end - Headers: Same as above
Body:
{
"call_id": "{{{system.timestamp}}}_{{{system.sessionID}}}",
"customer_ref": "{{{customer_ref}}}",
"intent": "{{{primary_intent}}}",
"intent_status": "{{{intent_status}}}",
"variables": {
"conversation_summary": "{{{conversation_summary}}}"
}
}
Example Flow
Start
↓
Get Caller Phone (from system variable)
↓
API Call: Sticky Calls /calls/start
↓
IF confidence >= 0.7:
Speak: "Welcome back, {caller_name}!"
→ Route to relevant intent
ELSE:
Speak: "Welcome! I'm here to help."
→ Standard flow
↓
... conversation ...
↓
API Call: Sticky Calls /calls/end
↓
End
Pro Tips
1. Use Caller ID
// Get caller's phone number
const callerPhone = Voiceflow.getCallerID();
// Store in variable
Voiceflow.setVariable('caller_phone', callerPhone);
2. Build Conversation Summary
// Throughout conversation, build summary
let summary = "";
summary += "Customer asked about: " + {user_question};
summary += ". Resolution: " + {agent_response};
// Save at end
Voiceflow.setVariable('conversation_summary', summary);
3. Handle API Errors
API Call
↓
IF response.status = 200:
Continue with context
ELSE:
Log error
Continue without context (graceful degradation)
Testing
- Test with known phone number
- Make first call (no match expected)
- Complete conversation
- Make second call (match expected)
- Verify context returned
Resources
Ready to add memory to your Voiceflow agent? Sign up →