{"id":658,"date":"2022-12-05T13:59:44","date_gmt":"2022-12-05T10:59:44","guid":{"rendered":"https:\/\/docs.unibell.ru\/?page_id=658"},"modified":"2025-02-11T07:50:06","modified_gmt":"2025-02-11T04:50:06","slug":"%d1%80%d0%b5%d0%b3%d0%b8%d1%81%d1%82%d1%80%d0%b0%d1%86%d0%b8%d1%8f-%d0%ba%d0%b0%d1%80%d1%82-%d0%bb%d0%be%d1%8f%d0%bb%d1%8c%d0%bd%d0%be%d1%81%d1%82%d0%b8-%d1%80%d0%be%d0%b1%d0%be%d1%82%d0%be%d0%bc","status":"publish","type":"page","link":"https:\/\/docs.cpaas.mittoapi.net\/?page_id=658","title":{"rendered":"Registration of loyalty cards by a robot"},"content":{"rendered":"\n<p><strong>Goal:<\/strong><\/p>\n\n\n\n<p>Unburden the hotline operators by transferring incoming calls for the registration of loyalty cards to work.<\/p>\n\n\n\n<p><strong>Decision:<\/strong><\/p>\n\n\n\n<p>The hotline receives a call from a customer in order to register a loyalty card. The robot receives the call and polls the client. After that, it sends an SMS with a verification code to the phone number from which the client is calling, and then recognizes the SMS code voiced by the client and transmits the collected information to the company&#8217;s server. It is also necessary to obtain from the client consent to the processing of personal data that will be collected during the conversation.<\/p>\n\n\n\n<p>Let&#8217;s create an incoming script for this case.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2023\/07\/robot_1-1.png\"><img decoding=\"async\" width=\"1619\" height=\"1079\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot_1-1-edited-1.png\" alt=\"\" class=\"wp-image-3448\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot_1-1-edited-1.png 1619w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot_1-1-edited-1-300x200.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot_1-1-edited-1-1024x682.png 1024w\" sizes=\"(max-width: 1619px) 100vw, 1619px\" \/><\/a><\/figure>\n\n\n\n<p>To successfully register a loyalty card, it is necessary that the customer:<\/p>\n\n\n\n<ol>\n<li>He called the Surname, First Name and Patronymic;<\/li>\n\n\n\n<li>Told date of birth;<\/li>\n\n\n\n<li>Told the loyalty card number indicated on the back;<\/li>\n\n\n\n<li>Announced the work of the SMS code.<\/li>\n\n\n\n<li>Gave consent to the processing of personal data.<\/li>\n<\/ol>\n\n\n\n<p>We will create variables in which the client&#8217;s responses will be saved for subsequent transmission to the company&#8217;s server and variables in which the responses from the server will be saved:<\/p>\n\n\n\n<p><strong>name<\/strong> \u2013 for the Surname of the First Name and Patronymic;<\/p>\n\n\n\n<p><strong>date<\/strong> \u2013 for the date of birth;<\/p>\n\n\n\n<p><strong>number <\/strong>\u2013 for the card number;<\/p>\n\n\n\n<p><strong>numberstatus<\/strong> \u2013 for the card number reconciliation result returned by the company&#8217;s server;<\/p>\n\n\n\n<p><strong>code<\/strong> \u2013 for the SMS code dictated by the client;<\/p>\n\n\n\n<p><strong>codestatus<\/strong> \u2013 for the SMS code reconciliation result returned by the company&#8217;s server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot2.png\"><img decoding=\"async\" width=\"1024\" height=\"665\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot2-1024x665.png\" alt=\"\" class=\"wp-image-3449\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot2-1024x665.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot2-300x195.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot2.png 1331w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Next, under the Incoming call block, we will place and configure a Player in which the robot will say at the beginning of the conversation with the client:<\/p>\n\n\n\n<p>&#8220;Hello, you have called the hotline of the Cozy store chain. My name is Elizabeth, I am a robotic assistant. I will help you register a loyalty card. Please state your First Name, Last Name and Patronymic.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot3.png\"><img decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot3-1024x676.png\" alt=\"\" class=\"wp-image-3450\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot3-1024x676.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot3-300x198.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot3.png 1331w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>We will place a Recognition block under the Player to recognize the client&#8217;s response (full name). In the settings, select the <strong>name<\/strong> variable in which the recognition result will be saved.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot4.png\"><img decoding=\"async\" width=\"1024\" height=\"665\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot4-1024x665.png\" alt=\"\" class=\"wp-image-3451\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot4-1024x665.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot4-300x195.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot4.png 1343w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Next, we will place a new Player block in which the robot will say:<\/p>\n\n\n\n<p>&#8220;Thank you! Now, please state your date of birth.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot5.png\"><img decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot5-1024x669.png\" alt=\"\" class=\"wp-image-3452\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot5-1024x669.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot5-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot5.png 1344w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Under it, we will place the Recognition block, in which the client&#8217;s response about the date of birth will be stored in the <strong>date<\/strong> variable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot6.png\"><img decoding=\"async\" width=\"1024\" height=\"666\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot6-1024x666.png\" alt=\"\" class=\"wp-image-3453\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot6-1024x666.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot6-300x195.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot6.png 1333w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Below we will add another Player block with the text:<\/p>\n\n\n\n<p>&#8220;Please state the number of your loyalty card indicated on the back.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot7.png\"><img decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot7-1024x675.png\" alt=\"\" class=\"wp-image-3454\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot7-1024x675.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot7-300x198.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot7.png 1335w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>And we will add the Recognition block, which will save the result of recognition of the loyalty card number to the <strong>number <\/strong>variable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot8.png\"><img decoding=\"async\" width=\"1024\" height=\"681\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot8-1024x681.png\" alt=\"\" class=\"wp-image-3455\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot8-1024x681.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot8-300x200.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot8.png 1324w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Now we will add an HTTP request block, in which we will pass the card number stored in the number variable to the company&#8217;s server.<\/p>\n\n\n\n<p>In the settings of this block, select Waiting for a response -Required, and in the Variable field for the response code, select the previously created variable <strong>numberstatus<\/strong>. The result of the card number reconciliation returned by the company&#8217;s server will be saved in it. Let&#8217;s assume that the server will return the reconciliation result in the form of codes <strong>200<\/strong> (found in the database) and <strong>404<\/strong> (not found in the database).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot9.png\"><img decoding=\"async\" width=\"1024\" height=\"664\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot9-1024x664.png\" alt=\"\" class=\"wp-image-3456\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot9-1024x664.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot9-300x195.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot9.png 1340w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Now let&#8217;s analyze what response came from the company&#8217;s server to the number status variable. To do this, from the anchor \u201cResponse\u201d we will lay the block Var analysis with two values of the variants of the values of the variable numberstatus. The value is <strong>200<\/strong> if the card number is found and the value is <strong>404<\/strong> if the number is not found in the database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot10.png\"><img decoding=\"async\" width=\"1024\" height=\"673\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot10-1024x673.png\" alt=\"\" class=\"wp-image-3457\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot10-1024x673.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot10-300x197.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot10.png 1337w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>If the card number is not found, the robot will inform the client about it and offer to go through the procedure of voicing the card number again, or hang up.<\/p>\n\n\n\n<p>To do this, we plot from the option <strong>404<\/strong> block the Var analysis block of the IVR with text:<\/p>\n\n\n\n<p>\u201cI&#8217;m sorry, but the card number you specified was not found in the database. Say Yes to dictate your card number again. Say No to switch the conversation to the operator. To end the conversation, hang up the phone.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot11.png\"><img decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot11-1024x669.png\" alt=\"\" class=\"wp-image-3458\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot11-1024x669.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot11-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot11.png 1333w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Next, we need to add \u201cYes\u201d and \u201cNo\u201d answer options in the block settings. And from the \u201cYes\u201d option, we draw an arrow to the beginning of the Player block, in which the robot asked the client to name the card number.<br>And from the \u201cNo\u201d option, we conduct a Redirection block with the phone number of the operator to whom the call will be transferred.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot12.png\"><img decoding=\"async\" width=\"1024\" height=\"674\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot12-1024x674.png\" alt=\"\" class=\"wp-image-3460\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot12-1024x674.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot12-300x197.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot12.png 1319w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>After the server returns a positive response to the card number verification, we need to confirm the subscriber numbers to which the card will be linked by sending a verification SMS code. To do this, from the server response option <strong>200<\/strong> in the Var analysis block, we plot the IVR block with the text:<\/p>\n\n\n\n<p>\u201cThank you. According to the legislation and rules of the program, I need your consent to the processing of personal data. Say Yes if you agree. Say No if you don&#8217;t agree.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot13.png\"><img decoding=\"async\" width=\"1024\" height=\"671\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot13-1024x671.png\" alt=\"\" class=\"wp-image-3461\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot13-1024x671.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot13-300x197.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot13.png 1330w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>We add the answer options \u201cYes\u201d and \u201cNo&#8221; in the block settings.<\/p>\n\n\n\n<p>And from the answer option \u201cNo\u201d we lay another block of the IVR with the text:<\/p>\n\n\n\n<p>\u201cI apologize, but without your consent to the processing of personal data, your loyalty card cannot be registered. If you want to transfer the conversation to the operator, say Yes. If that&#8217;s not required, just hang up.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot14.png\"><img decoding=\"async\" width=\"1024\" height=\"670\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot14-1024x670.png\" alt=\"\" class=\"wp-image-3462\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot14-1024x670.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot14-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot14.png 1332w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>From the answer option Yes, we place the Redirection block with the operator&#8217;s phone number.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot15.png\"><img decoding=\"async\" width=\"1024\" height=\"667\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot15-1024x667.png\" alt=\"\" class=\"wp-image-3463\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot15-1024x667.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot15-300x195.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot15.png 1339w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>If the client agrees to the processing of personal data, we move from the answer option \u201cYes\u201d of the previous block to the IVR block Player with text:<\/p>\n\n\n\n<p>\u201cThank you. Now I will send an SMS message with a verification code to your number. Please spell the received code to me.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot16.png\"><img decoding=\"async\" width=\"1024\" height=\"668\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot16-1024x668.png\" alt=\"\" class=\"wp-image-3464\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot16-1024x668.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot16-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot16.png 1330w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Next, we add an HTTP request block, through which we contact the company&#8217;s server to send an SMS code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot17.png\"><img decoding=\"async\" width=\"1024\" height=\"670\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot17-1024x670.png\" alt=\"\" class=\"wp-image-3465\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot17-1024x670.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot17-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot17.png 1334w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Below we have the Recognition block with the code variable, in which the client&#8217;s response will be recorded. Do not forget to increase the pause before playback in the block settings to give the client enough time to receive and spell the SMS code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot18.png\"><img decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot18-1024x676.png\" alt=\"\" class=\"wp-image-3466\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot18-1024x676.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot18-300x198.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot18.png 1326w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>After recognizing the received code, as in the case of the loyalty card number, we verify it by sending the recognition result stored in the code variable to the company&#8217;s server via an HTTP request. In the block settings, select Waiting for a response \u2014 Required and select the <strong>codestatus<\/strong> variable for the response code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot19.png\"><img decoding=\"async\" width=\"1024\" height=\"668\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot19-1024x668.png\" alt=\"\" class=\"wp-image-3467\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot19-1024x668.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot19-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot19.png 1336w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>As in the previous case, we analyze the received response from the server. Under the HTTP request block, we add and configure the Var analysis block, with the code status variable into which the response from the server was saved. We connect it to the \u201cResponse\u201d anchor of the HTTP request block. We also add two variable values to its settings: <strong>200<\/strong> \u2014 for the code matched and <strong>404<\/strong> for the response code did not match.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot20.png\"><img decoding=\"async\" width=\"1024\" height=\"674\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot20-1024x674.png\" alt=\"\" class=\"wp-image-3468\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot20-1024x674.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot20-300x198.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot20.png 1327w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>For the case when the code dictated by the client did not match the SMS code sent by the system, we build a IVR block with text from option <strong>404<\/strong>:<\/p>\n\n\n\n<p>\u201cI&#8217;m sorry, but the code you dictated does not match the one you sent. To send a new SMS code, say Yes.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot21.png\"><img decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot21-1024x672.png\" alt=\"\" class=\"wp-image-3469\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot21-1024x672.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot21-300x197.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot21.png 1323w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>And we connect the Yes answer option with the beginning of the HTTP request block, in which the robot made a request to the company&#8217;s server to send SMS.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot22.png\"><img decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot22-1024x669.png\" alt=\"\" class=\"wp-image-3470\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot22-1024x669.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot22-300x196.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot22.png 1334w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Now we will design a script branch in which the SMS code dictated by the client coincided with the one sent. From the variant of the value of the variable <strong>200<\/strong> of the Var analysis block, we will lay the Player block with the text:<\/p>\n\n\n\n<p>\u201cThank you. Your loyalty card has been successfully registered. Happy shopping! Have a nice day!\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot23.png\"><img decoding=\"async\" width=\"1024\" height=\"677\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot23-1024x677.png\" alt=\"\" class=\"wp-image-3471\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot23-1024x677.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot23-300x198.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot23.png 1323w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>And in conclusion, I will transfer the data collected as a result of the conversation by the client to the company&#8217;s server. We add an HTTP request block in the end of the script.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot24.png\"><img decoding=\"async\" width=\"1024\" height=\"682\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot24-1024x682.png\" alt=\"\" class=\"wp-image-3472\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot24-1024x682.png 1024w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot24-300x200.png 300w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/05\/robot24.png 1316w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>We save the finished script by clicking on the \u201cSave\u201d button.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal: Unburden the hotline operators by transferring incoming calls for the registration of loyalty cards to work. Decision: The hotline receives a call from a customer in order to register a loyalty card. The robot receives the call and polls the client. After that, it sends an SMS with a verification code to the phone <a href=\"https:\/\/docs.cpaas.mittoapi.net\/?page_id=658\" class=\"more-link\">&#8230;<span class=\"screen-reader-text\">  Registration of loyalty cards by a robot<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2568,"parent":11,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"tpl\/cases-content.php","meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/658"}],"collection":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=658"}],"version-history":[{"count":21,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/658\/revisions"}],"predecessor-version":[{"id":4256,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/658\/revisions\/4256"}],"up":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/11"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/media\/2568"}],"wp:attachment":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}