← Help Center
freshdesk twilio 2 way sms

Incoming SMS and Ticket Creation

How Incoming SMS Works

When a customer sends an SMS to your Twilio number, the app receives the message via webhook and automatically creates a ticket in Freshdesk or Freshservice. The full sequence is:

  1. The app looks up the sender’s phone number in the contact database.
  2. If no contact exists, a new contact is created with the sender’s number as the mobile field.
  3. A ticket is created with the SMS body as the description and the contact as the requester.
  4. The Twilio number that received the message is stored against the ticket ID so future replies always come from the same number.

Contact Matching

The app searches Freshdesk or Freshservice for an existing contact whose mobile number matches the sender’s phone number.

ScenarioBehaviour
No matching contactA new contact is created with the sender’s number as the mobile field.
Matching contact foundThe existing contact is used as the requester — no duplicate is created.

On Freshservice, the app searches requesters (not contacts) and creates a requester record if none is found.


Smart Threading — Preventing Duplicate Tickets

When the same customer sends a follow-up SMS, the app checks whether they already have an open ticket within a configurable time window. If they do, the new message is added as a note on that existing ticket rather than creating a new ticket.

Threading conditions (configurable in iparams):

OptionDescription
Recent Activity WindowIf the contact has an open ticket with activity within the last N minutes, append to it instead of creating a new ticket.
Ticket ID PatternIf the SMS body contains text matching a configured pattern (e.g. a ticket number), append to that specific ticket regardless of the time window.

Both options can be used together. If neither condition matches, a new ticket is created.


Incoming MMS

If the customer sends an image or media file, the app:

  1. Downloads the media from Twilio’s media URL.
  2. Attaches it to the ticket (or note) alongside the text content.

Media from incoming MMS messages is stored in Azure Blob Storage and linked in the ticket. The original Twilio media URL is not used directly in the ticket to avoid expiry issues.


What the Ticket Looks Like

The ticket description is formatted as an HTML table with:

  • The SMS message body
  • The sender’s phone number (From)
  • The receiving Twilio number (To)
  • A heading of INCOMING SMS: via Twilio Webhook

The receiving Twilio number is also stored in the app’s key-value store keyed by ticket ID. This is what the auto-reply handler uses to send replies from the correct number.


Limitations

  • Incoming SMS ticket creation is available on Freshdesk and Freshservice only (not Freshsales).
  • The app must be installed and the webhook URL must be registered in Twilio before any incoming SMS will be processed.

Need Help?

Email support@taroo.in and we’ll respond within one business day.

Was this helpful?

Contact Support →