{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":9406,"path":"employee-service-management/contract-management-pro/cmpro-data-broker-playbook.md","title":"Add a data broker server script for the Playbook tab","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add a data broker server script for the Playbook tab\n\nConfigure a data broker server script that connects the UI Builder component to the script include method controlling the **Playbook** tab visibility.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to the **All** menu and enter `sys_ux_data_broker_transform.list`.\n\n    The Data Broker Server Scripts table appears.\n\n2.  Select **New**.\n\n    The Data Broker Server Script form opens.\n\n    \\[Omitted image \"cmpro-data-broker-playbook.png\"\\] Alt text: Data Broker Server Script form displaying sample values to configure for the playbook visibility.\n\n3.  In the **Name** field, enter the name for your configuration.\n\n4.  In the **Application** field, select the appropriate application scope for your implementation.\n\n5.  In the **Description** field, enter a description.\n\n    For example, `Whether to show or hide the Playbook tab on the Legal Counsel Center`\n\n6.  In the **Properties** field, add the following JSON configuration:\n\n    ```\n    [{\n                            \"name\": \"table\",\n                            \"label\": \"Table\",\n                            \"fieldType\": \"string\",\n                            \"mandatory\": true\n                            },\n                            {\n                            \"name\": \"sysId\",\n                            \"label\": \"Sys ID\",\n                            \"fieldType\": \"string\",\n                            \"mandatory\": true\n                            }]\n    ```\n\n7.  In the **Script** field, add the script for the data broker.\n\n    Example:\n\n    ```\n    function transform(input) {\n                            var table = input.table;\n                            var sysId = input.sysId;\n                            if (!table || !sysId) return true;\n                            \n                            return sn_lg_cf_workspace.LegalUIBWorkspaceDataBrokerHelper.hidePlaybookTab(table, sysId);\n                            }\n    ```\n\n    This function receives the table and sysId from the input, validates them, and calls the helper method to determine tab visibility.\n\n8.  Select **Update** to save the data broker server script.\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"}}