Session 3: Create order pizza flow
with sheepCow|5 years experience|Java
Session 1: Nexmo introduction
May 29, 2019 | 2:31 PM15:29
Session 2: Create a simple java application
May 29, 2019 | 2:31 PM37:54
Session 3: Create order pizza flow
May 29, 2019 | 2:31 PM44:8
Session 4: Finish order pizza flow
May 29, 2019 | 2:31 PM29:26
Session 5: Implement track and cancel flow
May 29, 2019 | 2:31 PM39:57
How to create a pizza ordering phone customer service with Nexmo
- Project length: 2h 47m
Through this series, I will show how you can use Nexmo's voice API to create a pizza ordering phone customer service.
In this project a pizza ordering system will be built in java on top of Nexmo voice Java SDK. It will be implemented 3 flows: Pizza ordering, pizza order status checking and pizza order cancelation.
What are the requirements?
- Knowledge in Java
- Knowledge in basic programming
What is the target audience?
- Developers that want to learn how to make an automated phone customer service
The project outline explains what you will learn in each session
What is Nexmo and talk about the voice API. Describe how to create a Nexmo voice application. Speak about EventURL vs AnswerURL, webhooks and Inbound and Outbound calls.
Create a java application on IDE and import Nexmo and Spark dependencies. GIve a little introduction to Spark framework. Create an Event endpoint and answer endpoint
Present the possible application flows. Implement the flow of ordering pizza without parsing the inputs.
Handle all the order pizza inputs. Build the entire data structure to save the customers orders
Implement track and cancel flow pizza orders flows. Speak about improvements that can be made and give a little conclusion
00:00:00-00:05:00 Hello everyone! My name is Ricardo and here to present you next... experiences and they have a messaging, I think, with SMS based and the voice ap is, which we are going to focus on this on this tutorial. Okay, so I can log in to this account, in my account. Okay, I'm here and now we can create our own application. So, it should be a voice okay and let's first... Before creating the application, let's talk our next mode voice API works. So, there are several actions that you can do and the next mode will handle those actions for you. So, you only have for example in Java to create the D action, the action options and sorry the actions object here. And after that, you just need to call them and return the JSON on the endpoint that the next mode will be calling. And we will check that later. So you have several actions to record the conversation, the connect talk, stream input and notify. So, the most important ones and the ones that we are using in this tutorial talk, so you send a synthesized speech through the phone call. So, someone just says what you type. You have the stream, where you can like to play some music on the phone call and you have the input. So you can ask the user for input, like press how many pieces you want. For example, and the user will press o2 and you will receive the two and you're gonna parse that the way you want it. So, you have also records, which I assume will record a call or a part of a call. Okay, this is the format. We have the conversation action to create standard moderated count conferences. So, I assume this is like to connect several people on the same call, yeah, we want to be using this. D connect, so you can use connects the action to connect to call a call to endpoints such as the phone numbers or VVC extension. So, maybe you... yeah, yeah, you will connect the call directly to a phone number, which again we won't use it. The talk, okay, this is the one synthesized in talk, the actors talk and the texts are here, so the person that is calling will hear this sentence... the w8 years well and people that are hearing call will hear the stream. After that we have the input, so the input is usually used with the talk because input requires the next mode to call your API that you are doing. We are doing that with Java. You can do it with whatever language you want. There are several next more clients for that... and you will just use the tool for whatever you want. Okay... you don't need to... to make to wait for the synthesized sentence to finish to enter digit and submit on Ash. This is input as well,l so you, for example, you will just only Endel the input after you submit ash. So, you can place like ten numbers and then ash. So, after the ash, your event URL will be called. Okay. So, yeah, the event URL it's your URL. 00:05:00-00:10:00 And when you receive the request from the input you'd receive some requests with those parameters. The ones that you are interested in or it's most interesting is this DTMF, which is the digit set user has typed on in on his phone. Yeah. So, notify snippets for that as you can see here. There are also several other code snippets with examples for other languages, but we are sticking with Java. So let's stay here. So, we are ready now to create our own next small application, right? So, why don't we go to our dashboard? Go to create an application and okay. This is the application name, so it's a way for you to identify whatever you want to call it. So, you can identify your application, so I don't know. Let me all the work, education it goes... Okay. Voice alright. Okay. Now, there are two main things that are important in this. You may... You may be asking what's the event URL. So, let's just reading saying that the phone is ringing, so you can control and see the entire flow of the phone... okay. So, since this is always required, okay? What we can do is just provide a google.com web page. This is this always returns 200 and after that after having a real endpoint in our application, we will replace this for whatever we want. Okay. Answer URL, so there are two types of calls Dean bound cow calls and outbound calls. So, in this case, we are going to make like customer service for a pizza restaurant, where you can order pizza. So you will have to pick up your phone, also outbound calls. This is the other way around. The next mode will call your device and you will pick up, so... to have it, we'll fill this later off with the API. So, you can click here, it will generate one for you automatically and you will receive the key.... to communicate with the next mode API. Now, an important part of the numbers. Let's create an application first. Create application. So, ok. Has been created. So, two exciting bound calls link a number below first. So, there is an important ecosystem voice, numbers and just link this number. Now, whenever we call this number it will... when the number receives the call and starts ringing, this even the URL will be called first. It actually can be it HTTP... status, okay? The reigning event. When I pick up, this answer URL will be called and this... in your application. Let's save changes. Alright, alright, alright. 00:10:00-00:12:11 So, to recap this. We bought a number because we are doing an inbound call and we have set up our application with our event URL... and CCO actions, next McHale control objects. So, you will return a list like on your input and that's it. So, this was session 1. I hope it wasn't too much. Really, this is really simple to use API. You have tutorials here that you can check them out. Those are in several different languages. You have for voice, for example, in the node. You have like, let me see private voice communication in node as well, called fracking. I have already shown it to you. There are some installation tips usage and tips and tricks and things like that. We will explore this in further sections and you also have the community if you want... ...that's it. It's really important to reference that the use of the API from what I understand is free... the only thing that you have to pay is to have your own numbers. So, if you go out your applications and you click, for example, our application that we just created and buy more numbers. Those numbers have a cost and I don't know if you won't tell you... if you think about it because you can do everything with this number and if you have the skills to program, your automatic machine to answer the phone calls, you can have lots of profit and lots of great customer experience. So, yeah, that's it. So I hope you...
Invite a Friend
Education Ecosystem referral program offers you a great opportunity to earn additional LEDU by inviting Friends!Invite a Friend