{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":9448,"path":"employee-service-management/contract-management-pro/cmpro-script-includ-agenticAI.md","title":"Update the contracts AI agents handler script include","bundle":null,"doc_type":null,"release":"australia","body":"\n# Update the contracts AI agents handler script include\n\nUpdate the ContractsAIAgentsHelper script include to add the sys\\_id of a customized Manage contract repository agentic workflow to run the agentic workflow autonomously.\n\n## Before you begin\n\nRole required: admin\n\n## About this task\n\nWhen you duplicate the Manage contract repository agentic workflow and create a customized agentic workflow, you must add the sys\\_id of the new agentic workflow in the ContractsAIAgentsHelper script include to run the agentic workflow autonomously.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **Script Includes**.\n\n    The Script Includes table appears.\n\n2.  In the Name column, search for `ContractsAIAgentsHelperSNC`.\n\n3.  Open **ContractsAIAgentsHelperSNC**.\n\n4.  In the **Script** box, copy the `startAiAgentConversation()` method.\n\n    \\[Omitted image \"cmpro-script-agentic-ai.png\"\\] Alt text: Script include for agentic workflow in CM Pro.\n\n5.  Navigate back to the Script Include table.\n\n6.  In the Name column, search for `ContractsAIAgentsHelper`.\n\n7.  Open **ContractsAIAgentsHelper**.\n\n8.  In the **Script** box, paste the `startAiAgentConversation()` method.\n\n9.  In usecaseId, add the sys\\_id of the new agentic workflow.\n\n    You can copy the sys\\_id of the new agentic workflow from the Use case \\[sn\\_aia\\_usecase\\] table.\n\n10. Select **Update**.\n\n\n## Result\n\nThe customized Manage contract repository agentic workflow runs autonomously when all the trigger conditions are met.\n\nFor more information, see [Manage contract repository agentic workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/contract-management-pro/cmpro-na-reminder-agentic-wf.md).\n\n**Parent Topic:**[Configuring agentic workflows in ServiceNow Otto for Contract Management Pro](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/contract-management-pro/cmpro-conf-agentic-workflow.md)\n\n**Related topics**  \n\n\n[Activate business rules for the Manage contract repository agentic workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/contract-management-pro/conf-repository-agentic-ai.md)\n\n[Set the default notice period for the Manage contract repository agentic workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/contract-management-pro/conf-sys-prop-default-np.md)\n\n[Enable notifications for AI extracted metadata and obligations](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/contract-management-pro/cmpro-na-me-agentic-ntf.md)\n\n"}}