{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":9402,"path":"employee-service-management/contract-management-pro/cmpro-config-script-playbook.md","title":"Add a script include method for the Playbook tab","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add a script include method for the Playbook tab\n\nAdd a script include method that controls the **Playbook** tab visibility on the contract repository record by verifying plugin availability and applying conditional logic.\n\n## Before you begin\n\nRole required: admin\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 the Script Include where you want to add the method.\n\n3.  Open the Script Include record.\n\n    \\[Omitted image \"cmpro-playbook-method.png\"\\] Alt text: Script include form to add the wrapper method\n\n4.  In the **Script** box, add the following method.\n\n    ```\n    hidePlaybookTab(table, sysId) { \n                            var pMgr = new GlidePluginManager(); \n                            if (pMgr.isActive(\"com.sn_cm_gen_ai\")) { \n                            return new sn_cm_gen_ai.ContractsMetadataExtractionHelper().hidePlaybookTab(table, sysId);  \n                            }  \n                            return true;  \n                            },\n    ```\n\n    This method checks if the ServiceNow Otto for Contract Management Pro \\(com.sn\\_cm\\_gen\\_ai\\) plugin is active. If the plugin is not active, it returns `true` hiding the tab by default.\n\n5.  Select **Update**.\n\n\n**Parent Topic:**[Configuring the Playbook tab on contract repository records](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/contract-management-pro/cmpro-config-playbook-tab.md)\n\n"}}