The Sinch MessageMedia integration for Zoho Desk streamlines customer support by adding SMS as a communication channel. This is an advanced integration that requires experience with Zoho Desk and Zoho Flow. If you're not familiar with these platforms, we recommend working with a Zoho partner to ensure setup runs smoothly.
SMS for Zoho Desk integration
Please watch this video for more information about the SMS for Zoho Desk integration.
Requirements
To use the Sinch MessageMedia integration with Zoho Desk, you'll need:
- A post-paid Sinch MessageMedia account with a dedicated number. If you're new to Sinch MessageMedia, you can register for an account.
- The following Zoho editions (advanced features aren't available in the free plans):
- Zoho Flow: Standard Edition
- Zoho Desk: Professional Edition
Configure fields in Zoho Desk
To enable SMS in Zoho Desk, you'll need to add a new section with two fields to your ticket layout. If you're unfamiliar with this, you can refer to Zoho's support article about customizing layouts in Zoho Desk.
-
Enter and configure the field names below:
- New section: SMS (the name can be adjusted)
- New Multi-Line field: "SMS Content to Send" (the name must be exactly as stated)
- New Checkbox field: "Send SMS" (the name must be exactly as stated)
- New Checkbox field: "SMS activated" (the name must be exactly as stated)
-
After adding these fields to your ticket layout, confirm the API names by going to the Fields List. The API names display as shown:
- Send SMS: cf_send_sms
- SMS activated: cf_sms_activated
- SMS Content to send: cf_sms_content_to_send
Zoho Desk org ID
Find your Zoho Desk org ID from the API settings page and make note of it (you will need it later).
Zoho Desk data center
Check the URL of your Zoho Desk instance. Open any page in Zoho Desk and check the Zoho domain extension being used e.g. in the Australian data center, the URL looks like this: https://desk.zoho.com.au/agent/mmaudemo/mm-au-demo/tickets/details/10499000000375507
The code examples that follow use the Australian data center but you can change it if you're in a different Zoho data center.
Set up a connection between Zoho Flow and Zoho Desk
To set up a connection between Zoho Flow and Zoho Desk:
- Open Zoho Flow.
- From the left-side navigation, click on Settings.
- Click on Connections.
-
Click the Create Connection button.
- Search for "Zoho Desk" and select the Zoho Desk tile.
- Click Next.
- Configure the connection:
- Connection Name: Zoho Desk SMS (we highly recommend you call the connection "Zoho Desk SMS" - if you call it another name, you'll have to alter the code in subsequent steps)
- Select the All triggers and actions option
-
Click on the Authorize button.
- In the pop-up window, review the access requirements and click Accept.
Set up the flows in Zoho Flow
Set up a folder in Zoho Flow
- Open Zoho Flow.
- From the left-side navigation, click on My Flows.
-
Click on the down-arrow next to the Create Flow button and click Create Folder.
Set up the flow for inbound messages
- Open the folder.
- Create a new flow for the inbound message functionality by clicking on the Create Flow button.
- Enter a Flow Name e.g. Inbound SMS to Zoho Desk
- Click the Create button.
-
In the Builder tab, find the Webhook tile and click the Configure button to choose this as the trigger for your flow.
-
Select JSON as the payload format and copy the webhook URL.
- Set up a webhook in the Sinch MessageMedia platform. Configure the webhook:
- Events: The webhook should be triggered for inbound SMS and inbound MMS
- Headers: None are required
-
Parameters:
- message_id: $mtId
- from_number: $sourceAddress
- inbound_message: $moContent
- Save the webhook.
- In Zoho Flow, click Next to test the webhook.
-
Click on the Test button and then send a message from your phone to your Sinch MessageMedia dedicated number. You should see a payload appear.
- Click the Done button.
-
Create a custom function for handling inbound SMS. Use this code (Github) for the function.
- If you're in a non-Australian data centre, you'll need to change the URL at the end in the invoke URL section from desk.zoho.com.au to your data center e.g. desk.zoho.com or desk.zoho.in
- You must have already set up the Zoho Desk connection. If you called the connection another name instead of "zoho_desk_sms", you'll need to change the code accordingly.
-
Add the function to the flow and map the parameters. Drag the function into the flow and map the webhook payload and enter your Zoho Desk org ID.
- Turn on the flow by toggling the Your flow is on/off option.
-
Test the flow. Send another inbound SMS to the dedicated number. It should create a ticket in Zoho Desk and if you reply again, it should add a comment to the ticket.
Set up the flow for inbound messages
- Open the folder.
- Create a new flow for the inbound message functionality by clicking on the Create Flow button.
- Enter a Flow Name e.g. Handle outbound SMS.
-
Click the Create button. The flow should look like the below:
- Choose Zoho Desk as the triggering app and Ticket updated as the trigger. Use the following configuration:
- Connection: Choose the connection you created earlier
- Portal: Choose the relevant Zoho Desk portal
- Department: Choose the relevant Zoho Desk department
-
Field: Choose the Send SMS field as the trigger (this is the checkbox you created earlier)
-
Filter criteria:
- SMS Content to send is not null; AND
- Send SMS equals true; AND
-
SMS activated equals true
- Create a custom function for handling inbound SMS. Use this code (Github) for the function.
-
Map the parameters from the Zoho Desk ticket update trigger to the check_that_message_can_be_sent function.
- ticket_id: Map the ticket ID
- sms_content: Map the SMS content to send field
- send_btn_state: Map the Send_SMS field
- channel: Map the ticket channel
- desk_org_id: Enter the Zoho Desk org ID
- Test the function and generate sample output by clicking the Execute button.
-
Enter some representative data and click the Executive button.
- Check that the output looks correct by clicking on the output tab and reviewing the results. If it looks similar, click Use this test data.
-
In the flow, add a Send Message action from Sinch MessageMedia.
- Map the parameters.
- Source number: Can be left blank if you want to use the default sender ID from your Sinch MessageMedia account. Otherwise you can specify a source number.
-
Destination number: Map the Mobile field from the check_that_message_can_be_sent.
If you can't see a Mobile field, you'll need to try executing the function and choosing the test data correctly.
-
Content: Map the SMS Content to send field from the Zoho Desk ticket trigger.
- Add another function to add the SMS as a comment in the ticket and clear the fields. Use this code (Github) for the function. You'll need to amend the data centre URL if you're outside Australia.
-
Map the parameters for the create_comment_and_clear_outbound_value function.
- ticket_id: Map to the ID of the Zoho Desk ticket trigger
- sms_content: Map to the SMS content to send field from the Zoho Desk ticket trigger
- desk_org_id: Enter your Zoho Desk org ID
- Click on the Save button.
- Check that your flow looks correct and turn on the flow by toggling the Your flow is on/off option.
-
Test the flow by triggering an SMS from Zoho Desk. Using the ticket that was created earlier while testing inbound SMS, test a manual outbound SMS by entering the SMS content to send, ticking the Send SMS checkbox and click Save. You should receive an SMS and there should be a new comment added to the ticket.
(Optional) Set up a flow to auto respond to inbound messages
If you'd like to automatically respond to inbound SMS with the ticket number, you can set up another flow.
- Open the folder.
- Create a new flow for the auto respond functionality by clicking on the Create Flow button.
- Enter a Flow Name e.g. Auto reply to first inbound SMS.
- Click the Create button.
-
Set up a Zoho Desk ticket created trigger. This is similar to the trigger for outbound SMS but this time it will be triggered by a new ticket being created where the Subject starts with SMS with +. This will therefore be triggered by the tickets that are created by our inbound SMS flow.
-
Drag in the check_that_message_can_be_sent function.
-
Map the parameters:
- sms_content: This time you will enter the message you want to send rather than mapping it from the ticket
- send_sms_state: Set this to true
- channel: Set this to SMS via Zoho Flow
- desk_org_id: Set your Zoho Desk org ID
-
In the flow, add a Send Message action from Sinch MessageMedia. Map the parameters.
- Destination number: Set the mobile field from the check_that_message_can_be_sent function
- Content: Enter the message you want to send (you can include merge fields from the ticket)
-
Add the create_comment_and_clear_outbound_value function and map the parameters.
- ticket_id: map to the ID of the Zoho Desk ticket that triggered the flow
- sms_content: Enter the message you are sending (you could also map the Content parameter from the MessageMedia Send Message action)
- desk_org_id: Enter your Zoho Desk org ID
- Turn on the flow by toggling the Your flow is on/off option.