Add comments to code
Add comments in the ServiceNow Otto for Code enabled script editor using quick actions.
Before you begin
Role required: now.assist.creator
Procedure
-
Navigate to any script editor enabled with ServiceNow Otto for Code and select a script.
For example, to open a script include form, navigate to All > System Definition > Script Includes and select a script include.
-
In the script editor, select a code and then select the Otto.
[Omitted image "soc-otto-menu.png"] Alt text: Select Add comments in code.
-
Select Add comments in code.
The comments appear highlighted in the script editor.
-
Review the AI-generated comments and then either accept or reject the comments.
If you accept the comments, they’re added to the script.
-
After accepting the comments, select Update to save your changes.
---
title: Add comments to code
description: Add comments in the ServiceNow Otto for Code enabled script editor using quick actions.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/api-reference/scripts/add-comments-to-code-with-quick-actions.html
release: brazil
product: Scripts
classification: scripts
topic_type: task
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [Use, ServiceNow Otto for Code, Scripting, API implementation, API implementation and reference]
---
# Add comments to code
Add comments in the ServiceNow Otto for Code enabled script editor using quick actions.
## Before you begin
Role required: now.assist.creator
## Procedure
1. Navigate to any script editor enabled with ServiceNow Otto for Code and select a script.
For example, to open a script include form, navigate to **All** > **System Definition** > **Script Includes** and select a script include.
2. In the script editor, select a code and then select the **Otto**.
\[Omitted image "soc-otto-menu.png"\] Alt text: Select Add comments in code.
3. Select **Add comments in code**.
The comments appear highlighted in the script editor.
4. Review the AI-generated comments and then either accept or reject the comments.
If you accept the comments, they’re added to the script.
5. After accepting the comments, select **Update** to save your changes.
| title | Add comments to code |
| description | Add comments in the ServiceNow Otto for Code enabled script editor using quick actions. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/api-reference/scripts/add-comments-to-code-with-quick-actions.html |
| release | brazil |
| product | Scripts |
| classification | scripts |
| topic_type | task |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | UseServiceNow Otto for CodeScriptingAPI implementationAPI implementation and reference |