{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":12675,"path":"employee-service-management/lifecycle-events/configure-hr-lifecycle-event-activity-set.md","title":"Configure a lifecycle event activity set","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure a lifecycle event activity set\n\nCreate or modify a lifecycle event activity set to define a container for a group of activities.\n\n## Before you begin\n\nRole required: sn\\_hr\\_le.admin or sn\\_hr\\_le.activity\\_set\\_manager\n\nActivity sets represent different stages in the lifecycle event process, and you must define when the activity set is triggered, such as immediately upon creation of the lifecycle event case or after the completion of another activity set. Each activity set is associated with a single lifecycle event.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Lifecycle Events** &gt; **Administration** &gt; **Manage Lifecycle Events**, and open a record.\n\n2.  Click the **Activity Sets** tab to access the lifecycle event builder.\n\n3.  Create a new or modify an existing activity set.\n\n    -   To create a new activity set, click **New Activity Set**.\n    -   To modify an existing activity set, hover over the activity set and click **Edit Activity Set**.\n4.  Fill in the fields on the form.\n\n<table id=\"table_qlb_yrq_42b\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nTitle\n\n</td><td>\n\nName of the lifecycle event activity set.\n\n</td></tr><tr><td>\n\nDisplay title\n\n</td><td>\n\nDisplay title of the activity set. The display title is employee-facing only, and appears on the activity sets timeline on the HR ticket page in both portal and mobile. For example, an employee-facing title for the preboarding activity set could be \"Get ready for day one.\" If no display title is provided, the default activity set name will be used instead.\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nDescription of the lifecycle event activity set.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nOption to activate the lifecycle event activity set for use.\n\n</td></tr><tr><td>\n\nDisplay order\n\n</td><td>\n\nOrder number for when the activity set appears in the lifecycle event builder and in the activity sets timeline on the HR ticket page.**Note:**\n\n-   The order number has no relation to when the activity set is triggered.\n-   If no order number is provided, then the activity set will appear after all of the numbered activity sets.\n-   The HR ticket page is where users can view the details of an HR case in the Employee Service Center. See [Standard Ticket Page view for HR Service Delivery](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/hr-service-delivery/ur-hr-standard-ticket-page.md) for more information.\n\n\n</td></tr><tr><td>\n\nDisplay to opened for\n\n</td><td>\n\nOption to show or hide the activity set to the opened for person of the lifecycle event case. If selected, the activity set will appear in the activity sets timeline on the HR ticket page in both portal and mobile.**Note:** If not selected, the activity set will not appear in the activity sets timeline. Any associated to-dos assigned to the opened for and subject person will still appear on the HR ticket page. However, to-dos that are assigned to anyone else will be hidden.\n\n</td></tr><tr><td>\n\nDisplay to subject person\n\n</td><td>\n\nOption to show or hide the activity set to the subject person of the lifecycle event case. If selected, the activity set will appear in the activity sets timeline on the HR ticket page in both portal and mobile. This is a three-part process. In addition to selecting the check box here, you must also:-   Select **Display activity sets to the subject person** for the lifecycle event type. See [Configure a lifecycle event](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/lifecycle-events/configure-hr-lifecycle-event-type.md) for more information.\n-   Select **Show case to subject person** for the HR service that the lifecycle event is associated with. See [Configure an HR service](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/hr-service-delivery/configure-hr-service.md) for more information.\n **Note:** If not selected, the activity set will not appear in the activity sets timeline. Any associated to-dos assigned to the subject person will still appear on the HR ticket page. However, to-dos that are not assigned to the subject person will be hidden.\n\n</td></tr><tr><td>\n\nAudience\n\n</td><td>\n\nThe specific audience the activity set targets. Setting an audience for an activity set allows you to create activities within an activity set for a specific group of people. If the audience field is empty, the activity set applies to all employees.You can also use audience as a filter when using the Test Activity Sets tool. For more information, see [Using the Test Activity Sets tool for a lifecycle event activity set](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/lifecycle-events/hr-lifecycle-event-test-tool.md).\n\n **Note:** You can also define an audience at the activity level. The audience criteria for an activity set overrides the audience criteria for an activity.\n\n</td></tr></tbody>\n</table>5.  In the **Activity Set Trigger Condition** section, set the trigger condition for the activity set.\n\n<table id=\"table_pzv_wnd_cgb\"><thead><tr><th>\n\nTrigger condition\n\n</th><th colspan=\"2\">\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nImmediate\n\n</td><td colspan=\"2\">\n\nActivity set triggers upon creation of the lifecycle event case.\n\n</td></tr><tr><td rowspan=\"7\">\n\nDate\n\n</td><td colspan=\"2\">\n\nActivity set triggers before, on, or after the specified date.**Note:** If the date for the activity set is updated, then the change will apply only to open HR cases with active activity sets that have not yet triggered.\n\n</td></tr><tr><td>\n\nTrigger table\n\n</td><td>\n\nSelect an HR case or profile table.\n\n</td></tr><tr><td>\n\nTrigger field\n\n</td><td>\n\nSelect a date field.\n\n</td></tr><tr><td>\n\nIgnore empty date\n\n</td><td>\n\nOption to not trigger the activity set when the date field is empty. If selected, the activity set will not trigger when the date field does not have a value.\n\n</td></tr><tr><td>\n\nDate offset type\n\n</td><td>\n\nSelect the date offset type:-   None\n-   Before\n-   After\n\n\n</td></tr><tr><td>\n\nDate offset quantity\n\n</td><td>\n\nProvide an offset quantity. This field is available when **Before** or **After** is selected from **Date offset type**.\n\n</td></tr><tr><td>\n\nDate offset units\n\n</td><td>\n\nProvide a unit of measure of days, weeks, or months. This field is available when **Before** or **After** is selected from **Date offset type**.\n\n</td></tr><tr><td rowspan=\"2\">\n\nOther Activity Sets\n\n</td><td colspan=\"2\">\n\nActivity set triggers after the completion of one or more activity sets.\n\n</td></tr><tr><td>\n\nActivity set dependencies\n\n</td><td>\n\nSelect one or more activity sets that must complete before the activity set triggers.\n\n</td></tr><tr><td rowspan=\"2\">\n\nAdvanced\n\n</td><td colspan=\"2\">\n\nActivity set triggers per the provided script.\n\n</td></tr><tr><td>\n\nTrigger script\n\n</td><td>\n\nProvide a custom script to determine when the activity set triggers.There are two variables in the scripts:\n\n -   parentCase: Reference to parent lifecycle event case.\n-   hrTriggerUtil: Allows checking of other activity sets or dates from other types of triggers.\n The Activity Set Launcher workflow runs every four hours to verify these conditions. See [Lifecycle Events workflows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/lifecycle-events/LEWorkflow.md).\n\n</td></tr><tr><td rowspan=\"3\">\n\nCondition\n\n</td><td colspan=\"2\">\n\nActivity set triggers per the specified conditions.**Note:** When defining conditions like case sensitivity or null values, see API [GlideFilter - Scoped, Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/server-api-reference/c_GlideFilterScopedAPI.md).\n\n</td></tr><tr><td>\n\nCondition table\n\n</td><td>\n\nSelect an HR case or HR profile table.\n\n</td></tr><tr><td>\n\nCondition\n\n</td><td>\n\nUse the condition builder to define the conditions that must be met for the activity set to trigger.\n\n</td></tr><tr><td rowspan=\"5\">\n\nCombination\n\n</td><td colspan=\"2\">\n\nActivity set triggers based on a combination of a specified date, other activity sets, and/or conditions.\n\n</td></tr><tr><td>\n\nCombination type\n\n</td><td>\n\nSelect when the activity set triggers:-   And: Activity set triggers only when all of the specified triggers are met.\n-   Or: Activity set triggers when any of the specified triggers are met.\n\n\n</td></tr><tr><td>\n\nDate\n\n</td><td>\n\nYou can specify a date as part of the combination trigger type.\n\n</td></tr><tr><td>\n\nOther Activity Sets\n\n</td><td>\n\nYou can select one or more activity sets that must complete as part of the combination trigger type.\n\n</td></tr><tr><td>\n\nCondition\n\n</td><td>\n\nYou can use the condition builder to define the conditions that must be met as part of the combination trigger type.\n\n</td></tr></tbody>\n</table>6.  Click **Submit** or **Update**.\n\n\n## Advanced trigger script\n\n-   Trigger type = advanced.\n-   The new hire \\(Subject Person\\) has an assigned manager.\n-   The start date for the new hire has been reached \\(cannot be empty\\).\n-   Two specific activity sets have completed.\n\n```\n(function shouldActivitySetTrigger(parentCase /* GlideRecord for parent case */,\n\t\t\t\t\t\t\t  hrTriggerUtil /* hr_TriggerUtil script include instance */) {\n\n\t//Check that employee has a manager\n\tvar employeelocationType = parentCase.subject_person.manager;\n\tif (gs.nil(employeeLocationType))\n\t\treturn false;\n\n\t//Check that the employees start date is populated and on or before today\n\tvar employeeStartDate = parentCase.subject_person_hr_profile.employment_start_date;\n\tif (gs.nil(employeeStartDate) || !hrTriggerUtil.checkForElapsedDate(employeeStartDate.getDisplayValue()))\n\t\treturn false;\n\n\t//Check Previous Sets have finished\n\tvar prerequisiteActivitySetIds = ['20f71984ecb61300964fb378c827556f', '58123661dbf2930085ea54c0cf9619ba'];\n\tif (!hrTriggerUtil.checkActivitySetsCompleted(prerequisiteActivitySetIds))\n\t\treturn false;\n\n\treturn true;   \n\n})(parentCase, hrTriggerUtil);\n```\n\nReplace the sys\\_ids in the example with your activity set sys\\_ids. From your activity set, click the **Form Context Menu** icon and select **Copy sys\\_id**.\n\n**Parent Topic:**[Configure a lifecycle event](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/lifecycle-events/configure-hr-lifecycle-event-type.md)\n\n"}}