{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":19005,"path":"government-industry/psds-sbp-cancel-draft-case.md","title":"Configure automatic cancellation for draft cases in Social Benefits Playbook","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure automatic cancellation for draft cases in Social Benefits Playbook\n\nAn admin can configure auto-cancellation of Social Benefits Playbook cases that remain in the draft state for longer than a set period of time. The number of days that the case can remain in the draft state before it is canceled can be configured by an admin. The default value is five days.\n\n## About this task\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System UI** &gt; **Script Includes** and search for the `SocialBenefitsConstants` record.\n\n2.  Select the record to open it.\n\n3.  Switch to the Social Benefits Playbook application to edit the record, if prompted.\n\n4.  Locate the `SocialBenefitsConstants.SOCIAL_BENEFITS_MODELS_ARRAY = [` function in the script.\n\n5.  Open a separate tab in your instance.\n\n6.  In the navigation bar, enter `cmdb_model.list` to display a list of all product models in Public Sector Digital Services playbooks.\n\n7.  Right-click on the name of the desired product model record in the Social Benefits Playbook, and in the context menu, select **Copy sys\\_id**.\n\n    For example, to close all draft applications submitted for Unemployment Insurance, right click the Unemployment Insurance record and copy the sys\\_id.\n\n8.  Paste the copied sys\\_id\\(s\\) into the `SocialBenefitsConstants.SOCIAL_BENEFITS_MODELS_ARRAY = [` function, adding more as needed.\n\n9.  Right click on the top menu bar, and in the context menu, select **Save**.\n\n10. Navigate to **All** &gt; **System Properties** &gt; **All** and search for the `sn_gsm_soc_bnfts.sb_cancel_draft_state` record.\n\n11. Switch to the Social Benefits Playbook application to edit the record, if prompted.\n\n12. Change the number in the **Value** field to set the number of days that a case can remain in the draft state before cancellation, and select **Update**.\n\n\n## Result\n\nThe Social Benefits Playbook is now configured to auto-cancel any draft cases that have remained in the draft state for more than `X` number of days.\n\n"}}