{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":50707,"path":"source-to-pay-operations/supplier-lifecycle-operations/create-new-user-criteria.md","title":"Create custom user criteria for primary managers","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create custom user criteria for primary managers\n\nYou can create custom user criteria for primary relationship managers for configuring the assessment reassignment criteria.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Knowledge** &gt; **Administration** &gt; **User Criteria**.\n\n2.  Select **New**.\n\n3.  On the User Criteria form, fill in the fields.\n\n<table id=\"table_ojq_r1g_1r\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nUnique name of the user criteria. For example, Supplier managers\n\n</td></tr><tr><td>\n\nUsers\n\n</td><td>\n\nUsers that must match the user criteria.\n\n</td></tr><tr><td>\n\nGroups\n\n</td><td>\n\nGroups that must match the user criteria.\n\n</td></tr><tr><td>\n\nRoles\n\n</td><td>\n\nRoles to match the user criteria. **Note:**\n\n-   Because the evaluation of a role is cached in the session, any change in the role requires you to log in again.\n-   User criteria are not applicable for elevated privilege roles.\n\n\n</td></tr><tr><td>\n\nAdvanced\n\n</td><td>\n\nOption to display or hide the advanced option that includes the **Script** field on the User Criteria form.\n\n</td></tr><tr><td>\n\nScript\n\n</td><td>\n\nAdd the script to define the list of all primary supplier managers \\(with role sn\\_slm.manager\\). This field is available when the **Advanced** option is selected on the User Criteria form.```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<unload unload_date=\"2026-02-24 08:42:21\">\n<user_criteria action=\"INSERT_OR_UPDATE\">\n<active>true</active>\n<advanced>true</advanced>\n<company/>\n<department/>\n<group/>\n<location/>\n<match_all>false</match_all>\n<name>Supplier managers</name>\n<role name=\"sn_slm.manager\">da72c74043942110bb9e89e90db8f2ef</role>\n<script><![CDATA[(function isAllowed() {\n    var stakeHolderGr = new GlideRecord('sn_slm_supplier_m2m_internal_stakeholders');\n\tstakeHolderGr.addQuery(\"user\",user_id);\n    stakeHolderGr.addQuery(\"relationship_type\",\"relationship_type_1\");\n\tstakeHolderGr.query();\n\treturn stakeHolderGr.next()\n\n})();]]></script>\n<short_description/>\n<sys_class_name>user_criteria</sys_class_name>\n<sys_created_by>maint</sys_created_by>\n<sys_created_on>2026-02-24 08:38:06</sys_created_on>\n<sys_domain>global</sys_domain>\n<sys_domain_path>/</sys_domain_path>\n<sys_id>902bb3bc50977250f8776d5de5c06973</sys_id>\n<sys_mod_count>6</sys_mod_count>\n<sys_name>Supplier managers</sys_name>\n<sys_package display_value=\"Global\" source=\"global\">global</sys_package>\n<sys_policy/>\n<sys_scope display_value=\"Global\">global</sys_scope>\n<sys_update_name>user_criteria_902bb3bc50977250f8776d5de5c06973</sys_update_name>\n<sys_updated_by>maint</sys_updated_by>\n<sys_updated_on>2026-02-24 08:42:16</sys_updated_on>\n<user/>\n</user_criteria>\n</unload>\n\n```\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nOption to activate or deactivate the user criteria.\n\n</td></tr><tr><td>\n\nCompanies\n\n</td><td>\n\nCompanies that the user record must match.\n\n</td></tr><tr><td>\n\nLocations\n\n</td><td>\n\nLocations that the user record must match.\n\n</td></tr><tr><td>\n\nDepartments\n\n</td><td>\n\nDepartments that the user record must match.\n\n</td></tr><tr><td>\n\nMatch All\n\n</td><td>\n\nOption to determine whether all elements from each populated user criteria field must match. If selected, only users who match all user criteria are given access. If cleared, the user must meet one or more of the set user criteria to be given access. By default, this check box is cleared so that any condition met provides a match.\n\n For example, consider a user criteria record for the following:\n\n-   Locations A or B\n-   Company C or D\nWith **Match All** selected, only users that meet all of these conditions are matched. For example, a user with a location A and a company C.\n\n If **Match All** isn’t selected, users meeting any of these conditions are matched. For example, a user with a location B.\n\n**Note:** If you select **Match All**, verify that you don't create contradictory conditions that can never be met. For example, if all users in location A work for company G, the conditions in this example can never be met.\n\n</td></tr></tbody>\n</table>4.  Select **Submit**.\n\n\n**Parent Topic:**[Configure user criteria for reassigning assessments](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/source-to-pay-operations/supplier-lifecycle-operations/configure-user-criteria-for-reassigning-assessments.md)\n\n"}}