All Examples
📊

Customer Surveys

Outbound AI calls for feedback collection

Overview

Automatically call customers to collect feedback, NPS scores, and detailed responses. Natural conversation beats robotic IVR surveys with higher completion rates.

Benefits

  • Higher response rates than email surveys
  • Natural follow-up questions based on answers
  • Real-time sentiment analysis
  • Automatic categorization of feedback

Example Conversation

AI Agent

Hi, this is Alex calling from CloudTech Solutions. I'm following up on your recent support interaction. Do you have about 2 minutes for a quick feedback call?

Caller

Sure, I can do that.

AI Agent

Great, thank you! On a scale of 1 to 5, how would you rate your recent support experience?

Caller

I'd say a 3. It was okay.

→ record_rating({question_id: 'support_rating', score: 3})
AI Agent

Thanks for that feedback. A 3 tells me there's room for improvement. What went well during your interaction?

Caller

The technician knew what he was doing and fixed my issue eventually.

→ record_feedback({question_id: 'positive_feedback', response: 'Technician was knowledgeable and resolved the issue', sentiment: 'positive'})
AI Agent

Good to hear the issue was resolved. What could we have done better?

Caller

I was on hold for 45 minutes before getting through. That was frustrating.

→ record_feedback({question_id: 'improvement_feedback', response: '45 minute hold time was frustrating', sentiment: 'negative'})
AI Agent

I completely understand—45 minutes is too long. I'll make sure this feedback gets to our team. Last question: on a scale of 0 to 10, how likely are you to recommend CloudTech to a colleague?

Caller

Probably a 7. The product is good but the support wait times need work.

→ record_rating({question_id: 'nps_score', score: 7, verbatim: 'Good product but support wait times need improvement'})
AI Agent

Thank you so much for your time and honest feedback. We're actively working on reducing wait times. Have a great day!

→ complete_survey({completed: true})

1. System Prompt

Configure your AI agent's personality and behavior.

system_prompt.txt
You are conducting a brief customer satisfaction survey for CloudTech Solutions. The customer recently had a support interaction.

Survey flow:
1. Introduce yourself and confirm they have 2-3 minutes
2. Ask about their recent support experience (1-5 rating)
3. Ask what went well
4. Ask what could be improved
5. Ask if they'd recommend us (NPS: 0-10)
6. Thank them and offer to connect them with support if needed

Be conversational, not robotic. If they give a low score, empathize and dig deeper. Keep it brief and respectful of their time.

2. Tools / Functions

Define the actions your AI agent can perform.

record_rating()

Record a numerical rating from the customer

Parameters

{
            "question_id": string - Identifier for the question (support_rating, nps_score),
            "score": number - The rating given (1-5 for satisfaction, 0-10 for NPS),
            "verbatim": string (optional) - Any additional comments
        }

Example Call

record_rating({"question_id": "support_rating", "score": 4, "verbatim": "The agent was helpful but took a while to resolve"})

record_feedback()

Record open-ended feedback

Parameters

{
            "question_id": string - Identifier for the question (positive_feedback, improvement_feedback),
            "response": string - The customer's verbatim response,
            "sentiment": string - positive, neutral, or negative
        }

Example Call

record_feedback({"question_id": "improvement_feedback", "response": "Wish the wait time was shorter", "sentiment": "neutral"})

flag_for_followup()

Flag this customer for manager follow-up due to negative experience

Parameters

{
            "reason": string - Why follow-up is needed,
            "urgency": string - low, medium, or high,
            "preferred_contact_method": string (optional) - phone or email
        }

Example Call

flag_for_followup({"reason": "Customer very dissatisfied with resolution time, considering cancellation", "urgency": "high"})

complete_survey()

Mark the survey as complete and calculate scores

Parameters

{
            "completed": boolean - Whether customer completed the full survey,
            "partial_reason": string (optional) - If not completed, why
        }

Example Call

complete_survey({"completed": true})

3. Webhook Handler

Handle tool calls from SIP4AI in your backend.

webhook.js
app.post('/webhook/survey', async (req, res) => {
  const { tool_name, parameters, call_id, customer_id } = req.body;
  
  switch (tool_name) {
    case 'record_rating':
      await db.survey_responses.create({
        customer_id,
        call_id,
        question_id: parameters.question_id,
        score: parameters.score,
        verbatim: parameters.verbatim,
        timestamp: new Date()
      });
      
      // Real-time alert for low scores
      if (parameters.score <= 2) {
        await slack.alert(`⚠️ Low score (${parameters.score}) from customer ${customer_id}`);
      }
      
      return res.json({ success: true, recorded: true });
      
    case 'record_feedback':
      await db.survey_responses.create({
        customer_id,
        call_id,
        question_id: parameters.question_id,
        text_response: parameters.response,
        sentiment: parameters.sentiment,
        timestamp: new Date()
      });
      
      // Categorize with AI
      const category = await openai.categorize(parameters.response);
      await db.survey_responses.update({ category });
      
      return res.json({ success: true, category });
      
    case 'flag_for_followup':
      await db.followups.create({
        customer_id,
        call_id,
        reason: parameters.reason,
        urgency: parameters.urgency,
        status: 'pending'
      });
      
      // Notify customer success team
      await email.send({
        to: 'cs-team@company.com',
        subject: `[${parameters.urgency.toUpperCase()}] Follow-up needed`,
        body: `Customer ${customer_id}: ${parameters.reason}`
      });
      
      return res.json({ success: true, followup_created: true });
      
    case 'complete_survey':
      // Calculate NPS and satisfaction scores
      const responses = await db.survey_responses.findByCall(call_id);
      const nps = responses.find(r => r.question_id === 'nps_score')?.score;
      
      await db.surveys.update(call_id, {
        completed: parameters.completed,
        partial_reason: parameters.partial_reason,
        nps_score: nps,
        completed_at: new Date()
      });
      
      return res.json({ success: true, nps_score: nps });
  }
});

More Examples

Ready to build your Customer Surveys?

Get started with SIP4AI in minutes. Self-host it, connect your SIP line, and deploy your AI agent.