Add a cloud phone system to your in-house CRM or business apps with Toky

Even though there are many business applications and CRMs that you can use without exceeding your budget, many companies prefer to have in-house tools that they can develop and customize as their business evolves. These are the cases where Toky’s turn-key integrations don’t serve you directly, but you can use our API to integrate Toky with your in-house applications. You can execute tasks such as calling customers and contacts with a single click within your software, sending SMS, and also synchronizing data between your custom application and Toky. Here are a few development tricks to help you get started with your own integration.

How to enable the click to call

To enable your software to make calls or send text messages with a single click, you can use our dialer. The dialer is a Toky web page that displays a keypad, from which you can call any phone number. If you give call=Number as a parameter, the Number is preloaded in the dialer.

Toky dialer make calls or send SMS

In the following example, you can see how using this Toky page you can generate a click to call prompt for any web application, with the help of an Iframe with the Toky dialer link and some JavaScript components:

  • jQuery to manipulate the page and add the click event to the links with phone numbers.
  • Fancybox to show the popup window where the dialer appears.
  • Bootstrap although is not required for this click to call code, we use this framework to create a single screen of CRM contact list and get a better look with a free theme taken from Bootswatch.

Any link with the .callbutton CSS class turns into a click to call button, and you can easily make calls or send SMS. You can only send text messages to mobile phones, and you must have an SMS enabled phone number in your Toky account.

Click on the phone numbers and you can see a popup with the Toky dialer and the selected number preloaded. You must have at least a Toky trial account to try.

You can take the code and adapt it to your requirements, so that your users can call and text contacts using Toky, by clicking on the phone numbers in your custom business software or CRM. It is critical to keep in mind that when using an Iframe, you must enable access to your microphone with the attribute allow="microphone" since Chrome restricts access to certain features from an Iframe by default. You can visit this link for more information.

Your iframe code should look similar to this:

<iframe style="display: none;overflow:hidden;width:100%;height:100%"  
id="ifrm"  
allow="microphone" src=""  
frameborder="0" scrolling="no">  
</iframe>  

Using Toky’s API to integrate your phone system and your in-house software

To use any method from our API, you need a Toky API key, which you can easily find by following the steps in this help post.

Sending SMS with the Toky API

To send text messages from your application, you first need at least one SMS enabled phone number in your Toky account, and then you can use the SMS sending method from our API:

https://api.toky.co/v1/sms/send  

You can see the method parameters and code examples on our developer page. You can use this method to send SMS notifications when some event happens in your software. For example, you can use text messages to notify customers when an order is shipped, when a payment date is due or when there a support ticket is solved.

Synchronizing contacts between Toky and your software

Keeping contacts synchronized between Toky and your software allows you to use the caller ID better. You can also be able to receive more information through the new_call webhook where you can get data such as the caller’s name and email, that way you can use this information to identify to whom you can log each call in your in-house software. To synchronize your contacts, you can use our API and perform the following operations:

  • Create new contacts: Allows you to create contacts in Toky with basic information.
  • Update contacts by ID: You can update the contact's data if you have stored the ID returned by the contact creation method.
  • Update contacts by phone number: If you do not have the contact's ID, you can update it using their phone number as a key. It is essential to keep in mind that in Toky, you can't have several contacts with the same phone number or email.

Synchronizing Toky call information with your software in real time

If you want to capture real-time information of inbound and outbound calls, SMS or voicemails, you can use a webhook. For this you must do the following:

  1. Create a REST web service that can receive the information that Toky sends to you in JSON format, every time the selected event happens.
  2. Register the link of your web service in Toky webhooks on the developers' page using your API Key, the URL of your service, and the event you need to capture: new_call, new_voicemail or new_sms.

Toky immediately sends data to your REST service when the selected event is triggered. You can check out our developers’ page for detailed information about the JSON structure you’ll receive for each event in the webhook.

Importing information from Toky

In our API, you can also use different methods to import information from your Toky account to your custom CRM. You'll receive the data in JSON format to process it and store it in your databases. Some of the information you can get includes:

Learn more about the Toky API on our developers page.

With Toky, you can start your call center in a few minutes and connect it to different CRM and business applications with our integrations, or use it from your in-house CRM with our API and call links. Try Toky for free.

comments powered by Disqus