{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":10217,"path":"employee-service-management/employee-experience-foundation/empworks-configure-ai-insights-skill.md","title":"Configure a custom AI insights skill for a task type","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure a custom AI insights skill for a task type\n\nConfigure a task to use a custom Now Assist skill for AI insights in the Task details widget. Optionally add a custom script to pre-process input or post-process the skill response.\n\n## Before you begin\n\nVerify that the Generative AI plugin \\(sn\\_generative\\_ai\\) and the configured skill are active.\n\nSelect and activate a Now Assist skill that works best for the task type.\n\nRole required: sn\\_hr\\_sp.esc\\_admin or admin\n\n## About this task\n\nAI insights help employees understand task details and make informed decisions. Configure a skill for each task type that requires AI-generated insights in the **Task details** widget. Learn about task scope and action widget configuration from [Configure task scope and action widget](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/employee-experience-foundation/empworks-configure-action-widget.md)\n\nYou can configure custom skills to provide task-specific insights. Examples include:\n\n-   Policy compliance checks for Concur approval tasks\n-   Field-level insights for CLM contract tasks\n-   Time-off balance details for leave requests\n\n**Note:** The widget displays AI insights only when you configure a skill for the task type.\n\n**Note:** Custom AI insights skill configuration is available in North America only.\n\n## Procedure\n\n1.  Go to **All** &gt; **Employee Center** &gt; **Administration** &gt; **To-dos Configurations**, select an existing to-dos configuration \\(for example, **sn\\_hr\\_sp\\_todos\\_config**\\) for the task category, such as **Approvals**\\), and navigate to the **Task Configuration** related list.\n\n2.  In the **Task Configurations** related list, open the task configuration for the required record type, such as **Request**.\n\n    Task configuration page and its related list open.\n\n    \\[Omitted image \"es-tasks-config-ai-insight.png\"\\] Alt text: Task configuration with AI insights skill\n\n3.  Go to the **AI insights** tab and select the **AI insights skill** field to a Now Assist skill from the available list.\n\n    \\[Omitted image \"es-tasks-ai-skill-field.png\"\\] Alt text: Task Configuration record for Request Item with the AI insights skill field set\n\n    You can select one of the two\n\n    -   Existing AI Insight Skills: Select from the existing pre-configured AI Insight skills provided by ServiceNow.\n    -   Custom AI Insight Skills: Enable custom skill processing by checking the custom skill option and providing your JSON format configuration.\n    **Note:** By default, the AI insights skill field is empty. Administrators can select the available skills such as built-in Checklist Generation skill instead of building a custom one. For example, select the built-in **Approval summary checklist generation** skill to show the approval checklist behavior. The checklist appears only while the approval is still actionable.For Employee Slate in North America, this skill defaults to **On-demand** to support customers who are upgrading.\n\n4.  Select the **Use custom script** check box to customize how the skill processes data,\n\n    Write a script in the **Skill execution script** field that performs the following actions:\n\n    -   Pre-processes the input data\n    -   Calls the AI insights skill\n    -   Post-processes the skill output\n    -   Returns a response that matches the skill output contract\n    \\[Omitted image \"es-tasks-skill-config.png\"\\] Alt text: Custom script skill configuration for task AI insights\n\n    Use a custom script to fetch external data before the skill runs. For example, fetch leave balances from Workday before a leave-approval task runs. You can also retrieve prior expense reports from Concur before an expense-approval task runs. Your script can use the following variables to build internal record or knowledge article URLs:\n\n    -   **__hostname__**\n\n        The virtual host of the instance, for example **now**.\n\n    -   **__experience__**\n\n        The current experience suffix, for example **employee** or **aiux-portal**.\n\n    The **Skill execution script** field opens.\n\n5.  Confirm that the task configuration is **Active**.\n\n6.  Save the task configuration.\n\n    You can now see the associated skill from the **Task Configuration** tab. The configured skill or your custom script generates AI insights for every record of that task type in the experience set by **Applies to**.\n\n\n## Result\n\nEmployees who open the task type see a summary and any reference links in the AI response card. The configured skill generates AI insights for every record of that task type.\n\nThe skill run fails if the selected skill does not accept **sys\\_id** and **table** parameters or if its output does not match the expected format. When a skill run fails, you see an error message instead of insights. To remove the AI insights section for that task type, clear the **AI insights skill** field and reload the page.\n\nThe skill execution script fails if it does not return a response that matches the skill output contract. When the script fails, you see a generic error message instead of insights.\n\nUnderstand the basics of AI insights skill, see [AI insights skill reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/employee-experience-foundation/empworks-ai-insights-skill-ref.md).\n\n**Related topics**  \n\n\n[AI insights skill reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/employee-experience-foundation/empworks-ai-insights-skill-ref.md)\n\n[Configure task scope and action widget](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/employee-experience-foundation/empworks-configure-action-widget.md)\n\n"}}