https://s3-us-west-2.amazonaws.com/secure.notion-static.com/246d3d08-3544-4f08-83ff-8aefd0517c40/week6.jpg

Now, after extensive research looking at alternative platforms for conversation flows, we concluded that Voiceflow would be the best platform to use.

Despite the diagram problems we discovered in the previous week, we concluded that going we are going to maintain and update our interpretation software each time Voiceflow has an update.

<aside> 🎯 Breakdown of Goals

This week we also looked more into the interpretation of the diagram and looking into whether Twilio is the best platform to use for what we want to achieve.

1**. Voiceflow JSON Diagram Interpretation** Progress has been made where we are able to take the JSON data and convert it into a python script where we can remake the conversation. The script for this can be found on GitHub.

2**. Twilio Alternatives Research** We found that there isn't a unified JSON definition for an Autopilot bot. You would need to use the REST API to create an Assistant resource and then Create Task resources for that Assistant (and Samples/Field Types) to create a complete bot.

</aside>


Voiceflow JSON Diagram Interpretation

Progress has been made where we are able to take the JSON data and convert it into a python script where we can remake the conversation. The script for this can be found on GitHub.

Example of working script

Example of working script

It's currently for basic yes/no conversations and supports (speak blocks, interaction blocks) and it will have to be extended in the future to support more Voiceflow functions.

The JSON contains intermediate blocks which have no useful data. In the future, if Voiceflow were to change their format, we'd have a way to gracefully handle that exception and notify the user of the change and then update our interpreter.

"5fa30d3dae56a9feaddc7dde": {
      "nodeID": "5fa30d3dae56a9feaddc7dde",
      "type": "block",
      "coords": [
        -949.1832218221239,
        -1113.5755688946006
      ],
      "data": {
        "name": "Block",
        "color": "standard",
        "steps": [
          "5fa30d3eae56a9feaddc7e3c"
        ]
      }
    },

Twilio Alternatives Research

We found that there isn't a unified JSON definition for an Autopilot bot. You would need to use the REST API to create an Assistant resource and then Create Task resources for that Assistant (and Samples/Field Types) to create a complete bot.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0f9d3fed-52dc-4f52-bacc-65b3ac12fd35/Untitled.png

The JSON diagram that is generated by Voiceflow seems to be the format required for an Amazon Lex bot. We looked at if there is a way we can easily port the JSON into a Twilio bot but currently Twilio only supports this with dialogflow integration.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7be389bf-23d1-4527-9dfa-e11b506bc6b8/Screenshot_2021-01-13_at_19.55.09.png

Since Twilio Autopilot doesn’t natively support this integration, we found a community-developed plugin called Autopilot CLI developed by dabblelabs.  This plugin allows you to create, delete and edit bots and more or less has the functionality we need.

If the sequence of questions can change based on the answers to previous questions, you would not be able to declaratively define all the questions in JSON because Autopilot will attempt to ask all the questions that are in the JSON.