{"article":{"id":34328355703835,"url":"https://talkdesksupport.zendesk.com/api/v2/help_center/en-us/articles/34328355703835.json","html_url":"https://support.talkdesk.com/hc/en-us/articles/34328355703835-Autopilot-Sharing-Data-between-Studio-and-Autopilot","author_id":416055420711,"comments_disabled":true,"draft":false,"promoted":false,"position":10,"vote_sum":0,"vote_count":0,"section_id":4405087517339,"created_at":"2025-02-24T17:57:25Z","updated_at":"2026-06-09T17:54:35Z","name":"Autopilot: Sharing Data between Studio and Autopilot","title":"Autopilot: Sharing Data between Studio and Autopilot","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2025-02-24T18:06:34Z","user_segment_id":null,"permission_group_id":1525572,"content_tag_ids":[],"label_names":["studio","studio flow","autopilot"],"body":"<p>Talkdesk Autopilot includes a <a href=\"https://support.talkdesk.com/hc/en-us/articles/360018298032-Talkdesk-Studio-Overview\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">Studio</span></a> component that enables the integration of conversational automation into your Studio flows. As part of the Studio flow execution, it is common to gather data either from the contact's input or through a data dip, which is beneficial for enhancing the conversational experience provided by the Autopilot. </p>\n<p>Studio can share relevant caller information like name, customer ID, balance, etc., obtained from a previous data dip with the Autopilot. The Autopilot can then utilize this data to deliver improved conversational experiences by exchanging information back to Studio. For example, the Autopilot can collect the reason for the contact and share it with Studio, allowing Studio to make more informed routing decisions. </p>\n<p> </p>\n<ul>\n<li>\n<a href=\"#h_01JMWHK9BDCE5N42V9BZTMDE4F\">Sending values from Studio to Autopilot</a>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li class=\"wysiwyg-indent0.5\"><a href=\"#h_01JMWHK9BDYVAHJ1Z2KZ27QBCT\">Sending a single value from Studio to Autopilot</a></li>\n<li class=\"wysiwyg-indent0.5\"><a href=\"#h_01JMWHK9BDPZ1EZK32YEWZKDZK\">Sending multiple values from Studio to Autopilot</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li><a href=\"#h_01JMWHK9BDV9SA4PHY2PS56SK5\">Sending values from Autopilot to Studio flow</a></li>\n</ul>\n<p> </p>\n<h2 id=\"h_01JMWHK9BDCE5N42V9BZTMDE4F\"><strong>Sending values from Studio to Autopilot</strong></h2>\n<p>To send Studio’s data to Autopilot you need to define the Studio variable in the “Agents availability” field inside the <a href=\"https://studio.talkdesk.com/docs/connect-to-autopilot-voice\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">Connect to autopilot</span></a> Studio component. To use this value inside the Autopilot, you need to use the <a href=\"https://support.talkdesk.com/hc/en-us/articles/13490010878107-Automation-Designer-Custom-and-System-Variables\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">system variable</span></a> <em>businessHours</em> on Automation Designer.</p>\n<p> </p>\n<h3 id=\"h_01JMWHK9BDYVAHJ1Z2KZ27QBCT\"><strong><span style=\"color: #434343;\">Sending a single value from Studio to Autopilot</span></strong></h3>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328355690523\" width=\"688\" height=\"418\"></p>\n<p>To pass a single variable to the selected autopilot <strong>[1]</strong>, assign the variable with value to the field Agents availability <strong>[2]</strong> on the Connect to autopilot Studio component in the chosen Studio flow.</p>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328355691419\" width=\"683\" height=\"324\"></p>\n<p>On Automation Designer the variable value will be available on the system variable businessHours.</p>\n<p> </p>\n<h3 id=\"h_01JMWHK9BDPZ1EZK32YEWZKDZK\"><strong><span style=\"color: #434343;\">Sending multiple values from Studio to Autopilot</span></strong></h3>\n<p>It is possible to send multiple values to the Autopilot by first creating a variable with all those values merged in Studio and then processing those values inside <a href=\"https://support.talkdesk.com/hc/en-us/articles/10440836447899-Automation-Designer-Overview\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">Automation Designer</span></a>. </p>\n<p><strong><em>Tip:</em></strong><em> To handle multiple values we recommend using JSON objects, because they will be easier to control and maintain.</em></p>\n<p>By using Studio functions you can create a JSON variable and then convert it to a String to be passed to the Autopilot. </p>\n<p class=\"wysiwyg-text-align-center\"><span style=\"color: #1e0044;\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328339414811\" width=\"603\" height=\"633\"></span></p>\n<p><span style=\"color: #1e0044;\">The image above shows an example of constructing a JSON object with multiple variables using </span><a href=\"https://studio.talkdesk.com/docs/functions\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">Studio Functions</span></a><span style=\"color: #1e0044;\">. The output of the function should be a String.</span></p>\n<p class=\"wysiwyg-text-align-center\"><span style=\"color: #1e0044;\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328355693851\" width=\"664\" height=\"451\"></span></p>\n<p><span style=\"color: #1e0044;\">In Studio you can now select the correct function to join the separate values in a single JSON object.</span></p>\n<p class=\"wysiwyg-text-align-center\"><span style=\"color: #1e0044;\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328355695003\" width=\"683\" height=\"415\"></span></p>\n<p><span style=\"color: #1e0044;\">Once the Autopilot initiates the session it will follow the flow constructed within Automation Designer. To access the </span><em>customer data</em><span style=\"color: #1e0044;\"> </span><span style=\"color: #1e0044;\">value sent by Studio, you will need to use the </span><em>businessHours</em><span style=\"color: #1e0044;\"> variable and convert it to an object. For this, you will need to use the </span><a href=\"https://support.talkdesk.com/hc/en-us/articles/11228247470363-Automation-Designer-Function-Component\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">Function component</span></a><span style=\"color: #1e0044;\"> available from the component tool bar. </span></p>\n<p><span style=\"color: #1e0044;\">The Welcome message trigger flow is regularly used to point to an Automation Designer Function component for parsing the data. This will ensure that Autopilot will start the conversation with the data correctly mapped.</span></p>\n<p> </p>\n<h2 id=\"h_01JMWHK9BDV9SA4PHY2PS56SK5\"><strong>Sending values from Autopilot to a Studio flow</strong></h2>\n<p class=\"wysiwyg-text-align-center\"><span style=\"color: #1e0044;\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328339420699\" width=\"673\" height=\"409\"></span></p>\n<p><span style=\"color: #1e0044;\">To send a value from Autopilot to the Studio flow, in Automation Designer, you need to use the </span><a href=\"https://support.talkdesk.com/hc/en-us/articles/10465180356123-Automation-Designer-Escalation-Component\"><span class=\"wysiwyg-underline\" style=\"color: #1155cc;\">Escalation component</span></a><span style=\"color: #1e0044;\">. In the Escalation component settings, define the value to send to the Studio flow in the “Input to Studio” field. This is a free text field where you can define text, a variable, or a combination of both.</span></p>\n<p class=\"wysiwyg-text-align-center\"><span style=\"color: #1e0044;\"><img src=\"https://support.talkdesk.com/hc/article_attachments/34328339422235\" width=\"674\" height=\"410\"></span></p>\n<p><span style=\"color: #1e0044;\">To access the value passed by Autopilot towards Studio, you need to open the “Connect to autopilot” Studio component and select the Studio variable that will receive the Autopilot value in the </span><em><span style=\"color: #1e0044;\">escalate_to</span></em><span style=\"color: #1e0044;\"> field.</span></p>\n<p><strong><em><span style=\"color: #1e0044;\">Note: </span></em></strong><em><span style=\"color: #1e0044;\">If Autopilot sends a JSON value, you will need to use a Studio Function component to map the JSON value to the Studio variables.</span></em></p>"}}