Skip to main content

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

  1. Open your Voiceflow project
  2. Drag API block onto canvas
  3. Configure:
    • Method: POST
    • URL: https://api.stickycalls.com/v1/calls/start
    • Headers:
      • Authorization: Bearer YOUR_API_KEY
      • Content-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 VariableAPI Response Path
customer_refcustomer_ref
confidenceidentity.confidence
recommendationidentity.recommendation
caller_namevariables.name.value
open_issuesopen_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:

  1. Add API block
  2. 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

  1. Test with known phone number
  2. Make first call (no match expected)
  3. Complete conversation
  4. Make second call (match expected)
  5. Verify context returned

Resources


Ready to add memory to your Voiceflow agent? Sign up →