Why Integrate SMS?
With SMS integration, your agent can:- Send appointment reminders to reduce no-shows.
- Deliver order updates and ticket confirmations instantly.
- Share promotional offers or discount codes with customers.
1. Steps to Integrate
-
Open Integration Settings
- Go to **Integration **section in your Manage Agent page.
- Add a new integration. Select SMS.
- Select Twilio as the operator and enter a name for your integration.
-
Get Twilio Credentials
- Open the Twilio Console Dashboard to retrieve credentials.
- Copy your Account SID (34- character alphanumeric identifier starts with
AC
) and Auth Token from the Account Info section. - Paste these into the integration form in Inya.
-
Choose Sender Type
**Option A — Phone Number **to send messages from a fixed number for consistent branding.
- In Twilio: Go to Develop → Phone Numbers → Manage → Active Numbers.
- Select an active SMS-enabled number and paste it into Inya.
- If you don’t have one, click Buy a Number in Twilio.
- In Twilio: Go to Develop → Messaging → Services.
- Copy the Messaging Service SID (starts with
MG
) and paste it into Inya. - If you don’t have one, click Create Messaging Service in Twilio.
-
Save
- Click Save to complete the integration.
2. Create an SMS Action
- Navigate to Actions
- Go to Manage Agents → Select Agent → Action Tab.
- Create Action
- Click + to open the Create Action card.
- Fill in Details
- Name: Use only letters, numbers, or underscores.
- Description: Describe when the action should trigger.
- Example: “Trigger this action when the user asks about available offers.”
- Select Integration
- Choose the Twilio SMS integration you set up earlier.
- Choose Trigger
- Post-Call: Executes after the conversation ends.
- If Post-Call is selected, you can:
- Add Variables (sent to the API).
- If Post-Call is selected, you can:
- On-Call: Executes during the conversation.
- If On-Call is selected, you can:
- Write a message in the Speak During Action section (what the agent says when executing).
- Add Before API Call Variables (sent to the API). Create new variables or reuse existing ones to store dynamic values like names, order IDs, or dates.
- Add After API Call Variables (received from the API).
- If On-Call is selected, you can:
- Post-Call: Executes after the conversation ends.
- Message Template
- Enter the SMS content to send. Use variables for dynamic content.
- Example:
Hello {{user_name}}, your order {{order_id}} is on the way!
3. Test Your SMS Action
Before using the action in real conversations, test it to ensure it’s working correctly.- Open Testing Mode
- Go to Manage Agents → Select Agent → Test.
- Start a Test Conversation
- Speak or chat with your agent inside the test interface.
- Trigger the Action
- Ask the agent for similar instructions or keywords mentioned in the Action’s Description.
- Example: If your description says “Trigger this when user asks about offers”, say “What offers do you have?”.
- Ask the agent for similar instructions or keywords mentioned in the Action’s Description.
- Check SMS Delivery
- Confirm the SMS arrives at the configured number.
- Ensure placeholders (e.g.,
{{user_name}}
) are replaced with actual values.
- Troubleshoot if Needed
- Click on the more options on your created action card to see the View Logs option. You can check the Action Logs here.
- Verify Twilio credentials and sender configuration.
- Make sure the test number is SMS-enabled.
- Review triggers, message template, and variables for errors.
✅ You’re ready! Your agent can now send automated, personalized SMS messages during or after calls.