Pivot Manager

The Pivot app gives developers greater control within designing Callflows than what comes natively in Kazoo. Pivot attempts to corral the salient data and send it, via HTTP to the developer’s web server. Pivot expects a response with appropriate XML or JSON, and will execute the Callflow returned on behalf of the developer.

Some examples use cases include:

  • Checking an external account balance before allowing a call
  • Routing an incoming call based on custom logic
  • Present menu items and respond to selections based on information in your database

💡

NOTE: This documentation refers to the Comm.land UI implementation of KAZOO

About the Pivot App

Pivot enables 3rd party developers to exert real time call control on KAZOO via REST API. This means your web or SaaS application can tell phone calls what to do, during the call!

When a Pivot call flow is created, a developer provides a URI (address) that points to their web server. From then on, when KAZOO receives a phone call for a Pivot-enabled phone number, KAZOO sends an HTTP request to the 3rd party server asking it for call flow commands. KAZOO will then take the response and execute the appropriate commands for the call.

With over 40+ APIs to choose from, you aren’t stuck rebuilding basic PBX functionality from scratch. 2600Hz adds a handy side app that helps you track your Pivot URLs and see payload information in real-time so you can troubleshoot your Pivot calls quickly and easily.

Below is an overview of the Callflow process with a Pivot Callflow Action implemented.

Set up a new Pivot Callflow Action

💡

NOTE on terms: We call a pivot routine we create as a “Pivot Callflow Action”. This is because it is added within our Callflows application, while creating IVRs, or Incoming Voice Responses. To create a new Pivot action, follow the following steps.

Select the + New Pivot Callflow Action button at the top right from your Pivot app home screen

Enter values to define the Action

Create its name

Use a name that you can easily remember and search. If you have multiple sub-accounts you may want to include the account name or abbreviation to call it out specifically.

Select a number or extension associated with the call.
Note you can select more than one number if, for example the same action can be associated with different incoming numbers or extensions. If you need a new number, you can purchase one and/or assign an already purchased number that is available in your account.

Select your method and URL to initiate in your request, and select the Request format you want to use.

💡

NOTE: There are a limited number of supported TwiML formats; we are adding more as requested: check for a current list HERE

Edit your Pivot Callflow Action

Once you have created a Pivot action it will save the data and display on the home listing page. To edit a Pivot, select the Gear icon to the right of the Pivot name.

Debug your Pivot Callflow Action

In the next section, you can find some testing tricks to try your Pivot action before you enable it on your account. If you have tested it, and want to view its payload and possible errors, go to the Debug page.

Request | Response Header View

Request | Response Payload View

Test your Pivot Action

To make sure Pivots are working we have tried using Beeceptor’s mock API. You create your endpoint in that website, create a mock rule and save the changes.

Then you enter the URL provided by Beeceptor into your Pivot and check if it works by calling the number you assigned to your Pivot. Beeceptor provides real time updates so you will see if the rule worked or not right away, then you can check Pivot’s Debug Log and you should also have a log from the Kazoo API.

💡

beeceptor.com

Beeceptor - Rest/SOAP API Mocking, HTTP Debugger & Proxy

Beeceptor helps you build mock rest and SOAP APIs without any coding. It is your go to tool for HTTP request debugging, intercepting and proxying.

Here’s an example of a test

If you want to create a test that shows the actual response you’re fetching, you can set up a PHP server to send responses back to Pivot. We used

There are others you can try also.

Here’s a demo video that I hope is useful for you. The URLs are the following:

Here’s the transcript to these steps:

  1. Let’s create a new pivot —
  2. Assign a name, let’s do server test as a name.
  3. Select a number from Spare numbers.
    1. We can select whatever one so I can do this 1585
  4. Enter your URL: we will be using this one, which is basically the server I set up.
  5. Select Request and Response format:
    1. Choose what you want to test
    2. Select checkbox to Save log data for this pivot
  6. Now, copy the number we assigned to the pivot so we can test it!
    1. Go to your phone app in comm.land to test. (as you can see, I’ve been testing a lot!)
    2. Use the number you assigned to make a call.
  7. Now you will hear what the server has to tell us. For us it’s “Hello there, please enter 123 followed by the pound sign.”
  8. Follow the instructions and enter an extension. As this is a test, the call ends. Your test is complete!
  9. Test also for incorrect inputs: Make the same call.
    1. And hello there, “please enter 123 followed by the pound sign”
    2. This time enter only 2 digits, for example, 1-2.
    3. Bye and also no response at all..
  10. So let’s try again.
  11. Hello there, please enter 123 followed by the pound sign.
    1. We didn’t receive any input.
    2. Bye.
  12. Now we can try with the response format which I also set up in the server.
  13. Return to the log page to see what has been saved from our tests:
    1. We have two new logs and if we go to the response payload, we get exactly what we heard.

Pivot FAQs

If I create a Pivot in Callflows app, does it automatically save the routine in my Pivot app?

Currently this is not supported. For this reason, if you want to use a Pivot routine across multiple accounts and in multiple callflow routines, we recommend you create them in the Pivot app. You can then access them from the callflows app.

Is there a way to chain multiple Pivot requests together?

Yes, it is possible to pass variables to multiple Pivot transactions. To do this you will want to use the set CAV (Custom Application Vars) option, and sent the results to a second Pivot.In the second Pivot add a query to see if a variable is set and access it that way.

What are some additional routing views and examples of a Pivot call?

This shows how a Pivot action is included as part of a Callflow using the Callflow app.

Reported Issues, 2.4

  1. Search field definition — known kazoo issue When you search for a single date you will see results from the entire month
  2. Creating callflow doesn’t allow you to continue if you’ve canceled once in the wizard — Short term solution is to change the spelling of your name — or any value — then change it back. It will reset the cache at this point.