Level Up Your Customer Support With Telinga API, Twilio APIs & Gemini AI
Tags: devchallenge, twiliochallenge, ai, twilio
Published: 2024-06-22 11:39:39

*This is a submission for [Twilio Challenge v24.06.12](https://dev.to/challenges/twilio)*

## What I Built

In today's experience-driven business landscape, exceptional customer support is no longer a luxury, it's a necessity. But managing a constant flow of feedback, analyzing sentiment, and crafting personalized responses can be a time-consuming and resource-intensive challenge.

Enter **Telinga**, a **customer support API** built with Django, Twilio, and Gemini AI. Telinga streamlines the process, automates tasks, and empowers you to deliver an exceptional customer experience that keeps your customers happy and coming back for more. Telinga seamlessly captures customers feedback through the Twilio API, which integrates with various communication channels like SMS and email. But Telinga goes beyond just collecting messages. It leverages the power of Gemini AI to analyze the sentiment of the feedback.  Is it positive praise? A neutral inquiry? Or a negative outburst requiring immediate attention? Telinga intelligently categorizes the sentiment, allowing you to prioritize responses and address critical issues promptly.


## Demo

### How Telinga Works:
1) **Onbaording**: Business Aggregators register and obtain API Key used in making subsequent calls 
2) **Upload Customer Data**: Integrators hit the Telinga API with a csv file containing the customer data using the template in the attached collection. This file is uploaded alongside the message template and delivery time (now or time in GMT)
3) **Notification**: Telinga will automatically send an SMS or email notification based on the information you provide. Notifications can be sent immediately (delivery_time set to "now") or scheduled for a specific time.
4) **Feedback Collection**: Customer feedback is collected via SMS or email.
5) **Language Detection and Translation**: Gemini detects the language and translates the feedback if necessary.
6) **Sentiment Analysis**: The feedback is analyzed for sentiment to determine if it requires escalation.
7) **Email Subject Generation**: Gemini generates an appropriate email subject for the response.
8) **Response and Escalation**: Responses are sent via SMS or email. If the feedback is negative, it is escalated to a support agent, and Twilio Programmable Voice API initiates a call to the customer.

{% embed https://www.youtube.com/watch?v=aR_HdLipUVc %}

API link: https://telinga.koyeb.app/api/ 

<!--_I've disabled public registration to prevent resource exhaustion on the Twilio test account_-->


![sms notification sent after onboarding customers via the upload_csv endpoint](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8rq6dhlttss4u32zv0xz.jpeg)
_sms notification sent after onboarding customers via the upload_csv endpoint_


![customer replies to the notification](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x95jurq9lmp3w8s8568s.jpeg)
_customer replies to the notification_


![automated response to customer's feedback. If feedback is negative, escalate via a call](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3d7ueq4ok9d0emzyga9j.jpeg)
_automated response to customer's feedback. If feedback is negative, escalate via a call_


![call made to customer upon receipt of negative feedback](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/81vcg4exvsq49h7gdu5o.jpeg)
_call made to customer upon receipt of negative feedback_

Code repo:
{% embed https://github.com/Onwuagba/Telinga %}

<!-- Share a link to your app and include some screenshots here. -->

### Twilio and AI

**Twilio's Role**

Telinga uses Twilio’s powerful APIs to manage communication across multiple channels:

- **Twilio Programmable Messaging API**: Handles SMS communication, ensuring reliable message delivery to and from customers.
- **Twilio SendGrid API**: Manages email communication, enabling automated responses to customer feedback.
- **Twilio Programmable Voice API**: Manages the escalation of feedback by initiating a call to the customer with a support agent when necessary.

**Gemini AI's Role**

Telinga integrates AI to enhance communication efficiency:

- **Sentiment Analysis**: Telinga utilizes Gemini to analyze the sentiment of customer feedback, summarizing it and escalating to a support agent if necessary.
- **Email Subject Generation**: Gemini generates compelling email subjects for responses, improving open rates and customer engagement.
- **Language Detection and Translation**: Gemini automatically detects the language of the feedback and translates messages to ensure accurate responses in the customer's language.



## Additional Prize Categories

- **Twilio Times Two**

Telinga leverages *Twilio's Programmable Messaging API*, *SendGrid API*, and *Programmable Voice API* to create a seamless communication tool that bridges SMS, email, and voice interactions.

- **Impactful Innovators**

By breaking down language barriers and enhancing feedback management, Telinga provides a significant positive impact on customer experience and business operations.

## Next steps:
- Telinga's future: Bespoke business chatbots to drive engagement via chat, auto-ticket system for negative feedback and direct app integration for a seamless, data-driven customer support experience.

<!-- Don't forget to add a cover image (if you want). -->