{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4895,"path":"conversational-interfaces/virtual-agent/create-custom-control.md","title":"Create a Virtual Agent custom control","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a Virtual Agent custom control\n\nBuild a custom input or response control that topic authors can use in topics or topic blocks. In Virtual Agent conversations, an input control gathers information from end users, while a response control displays information to end users.\n\n## Before you begin\n\n[Create the custom control definition](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/create-custom-control-definition.md).\n\n**Important:** To implement secure \\(password2\\) inputs in your Virtual Agent custom control, you must adhere to the scoped application requirements in Workflow Studio. For details, see [Workflow Studio scoped application requirements for secure inputs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/va-fd-app-reqs-secure-inputs.md).\n\n**Tip:** Developers and topic authors may need to access custom controls created in other application scopes. To give them access, see [Configure cross-scope access privileges for topic blocks and custom controls](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/configure-cross-scope-privileges.md).\n\nRole required: virtual\\_agent\\_admin or admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Conversational Interfaces** &gt; **Assisant Designer**.\n\n2.  Select the **Asset library** tab.\n\n3.  On the home page, select **Create asset** if you're in LLM topic discovery, or **Create topic** if you're in NLU/Keyword topic discovery.\n\n4.  On the form, fill in the fields.\n\n<table id=\"table_dzy_15h_cmb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nType\n\n</td><td>\n\nList of assets that you can create in Assistant Designer Asset library.\n\n Choose the type of custom control:\n\n-   **Custom Input Control**\n-   **Custom Response Control**\n\n\n</td></tr><tr><td>\n\nName\n\n</td><td>\n\nUnique name for the custom control that reflects its purpose.\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nBrief explanation of the purpose and functionality of the control.\n\n</td></tr><tr><td class=\"sub-head\" colspan=\"2\">\n\nAdvanced properties \\(optional\\)\n\n</td></tr><tr><td class=\"sub-head\" colspan=\"2\">\n\nMake inputs secure\\[Custom input controls only\\]\n\n</td></tr><tr><td>\n\nEnable\n\n</td><td>\n\nToggle switch that lets a custom input control pass secure inputs, such as passwords.\n\n</td></tr><tr><td class=\"sub-head\" colspan=\"2\">\n\nAvailable on the palette\n\n</td></tr><tr><td>\n\nEnable\n\n</td><td>\n\nToggle switch that determines whether the custom control appears as its own icon in the Utilities section of the palette on the **Flow** tab. This provides easy access to the control for other authors.\n\n</td></tr><tr><td class=\"sub-head\" colspan=\"2\">\n\nAdditional\n\n</td></tr><tr><td>\n\nCategories\n\n</td><td>\n\nList of categories. Categories identify and group related topics, topic blocks, or custom controls. If applicable, choose a category for your control.\n\n</td></tr></tbody>\n</table>5.  Select **Create**.\n\n    The **Flow** tab opens and displays an initial flow that contains a custom control node.\n\n6.  Select the **Start** node and define the input parameters to the control.\n\n    Topic authors will provide these input parameters and values from the calling topic.\n\n    1.  Select **+ Add**.\n\n    2.  On the form, fill in the fields.\n\n<table id=\"id_n4c_4sz_gpb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nName of the input variable that stores the input value.\n\n</td></tr><tr><td>\n\nType\n\n</td><td>\n\nType of data being passed to the topic block. For example, **String**, **Boolean**, and so on. The fields change according to your choice. For more information, see [Input data types in Virtual Agent topics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/va-data-types.md).\n\n</td></tr><tr><td>\n\nRequired\n\n</td><td>\n\nOption to set the parameter as required.\n\n</td></tr><tr><td>\n\nHint\n\n</td><td>\n\nTooltip that is visible when authoring a calling topic. See the following example:\\[Omitted image \"va-topic-block-hint.png\"\\] Alt text: Input variable mapping tooltip in this example displaying \"Test Hint String.\"\n\n</td></tr><tr><td>\n\nTable\n\n</td><td>\n\nServiceNow table that is used to query for input.This field is available only when **Reference** or **Array.Reference** is selected from the **Type** field.\n\n</td></tr><tr><td>\n\nMax Number of Rows\n\n</td><td>\n\nMaximum number of rows that the topic block is allowed to define.This field is available only when **Array** is selected from the **Type** field.\n\n</td></tr><tr><td>\n\nDefault Value\n\n</td><td>\n\nDefault value for the variable. This value can be used when previewing the block.Duplicate default values are not allowed for array data types.\n\n</td></tr></tbody>\n</table>    3.  Select **Save**.\n\n    4.  Repeat these steps for additional parameters.\n\n7.  Select the **End** node and define the output parameters and values returned from the custom control.\n\n    Topic authors can use the output value in the calling topic.\n\n    1.  Select **+ Add New**.\n\n    2.  Enter the name and value of the parameter.\n\n    3.  Repeat these steps for additional parameters.\n\n    4.  Select **Save**.\n\n8.  Select the custom control node and complete the property sheet as follows:\n\n    -   For a custom input control, fill in the [Custom input properties sheet](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/custom-input-properties-form.md).\n    -   For a secure custom input control, fill in the [Secure custom input properties sheet](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/secure-custom-input-properties-form.md).\n    -   For a custom response control, fill in the [Custom output properties sheet](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/custom-response-properties-form.md).\n9.  To create the control, select **Save** and then **Publish**.\n\n\n## Result\n\nIf you selected **Available on the palette** in the Properties page, the Custom Control icon displays as its own icon in the Utilities section of the palette. The control is listed on the Topics page, and you can use the Type menu to show only custom controls.\n\n## What to do next\n\n[Add a custom control to a Virtual Agent topic or topic block](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/embed-custom-control.md).\n\n"}}