{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":2772,"path":"application-development/ui-builder/client-script-summarization-generation.md","title":"Summarize a client script using ServiceNow Otto","bundle":null,"doc_type":null,"release":"australia","body":"\n# Summarize a client script using ServiceNow Otto\n\nUse the client script summarization skill to generate a plain-language summary of a client script directly in the UI Builder editor.\n\n## Before you begin\n\nMake sure that you install UI generation and that you have the ui\\_builder\\_admin role. For more information, see [Install UI generation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/ui-builder/install-ui-generation.md) and [Grant UI Builder admin role](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/ui-builder/grant-ui-builder-admin-role.md).\n\nTurn on the Client script summarization skill.\n\nRole required: ui\\_builder\\_admin\n\n## About this task\n\nClient scripts can be long and complex. The Explain code with ServiceNow Otto panel appears on the right side of the Edit client script dialog and generates a structured explanation of the selected script on demand. You can request a new explanation if the first response does not meet your needs.\n\n## Procedure\n\n1.  In the application navigator, navigate to **All** &gt; **Now Experience Framework** &gt; **UI Builder**.\n\n2.  Open an experience with a client script.\n\n3.  Select a page to open the page editor.\n\n4.  From the Data and scripts panel, open a client script.\n\n    The Explain Code panel appears if you have the ui\\_builder\\_admin role and have enabled the Client script summarization skill.\n\n5.  Select **Explain this code**.\n\n    ServiceNow Otto sends the script to the skill endpoint. When processing is complete, the panel displays two sections:\n\n    -   Summary: A concise description of what the script does.\n    -   Code explanation: A detailed explanation of how the script works, including which APIs are used and what each state variable does.\n    **Note:** If you change the script, a message in the **Explain code panel** notifies you of the update and asks whether the code should be explained again. Select **Explain again** to generate a new summary.\n\n6.  If the generated summary does not provide sufficient clarity, select the regenerate icon to request a new response from ServiceNow Otto.\n\n    The model generates an alternative explanation for the same script.\n\n7.  Review the summary and code explanation, then select **Cancel** or **Apply** as appropriate to close the dialog.\n\n\n## Result\n\nA concise summary, information about where the client script is triggered, and a detailed explanation of the script's functionality are displayed. Use this information to decide whether to keep, modify, or replace the script.\n\n|Symptom|Likely Cause|Resolution|\n|-------|------------|----------|\n|Explain Code panel does not appear|Client script summarization skill is disabled, or user lacks the ui\\_builder\\_admin role.|Activate Client script summarization skill in AI Admin Hub. Confirm the user has the ui\\_builder\\_admin role.|\n\n**Parent Topic:**[Using UI generation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/ui-builder/using-ui-generation.md)\n\n**Related topics**  \n\n\n[Client scripts](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/scripts/client-scripts.md)\n\n[Client script summarization](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/ui-builder/client-script-summarization.md)\n\n[Use case: Summarize a client script using ServiceNow Otto](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/ui-builder/use-case-client-script-summarization.md)\n\n"}}