# ServiceNow Catalog Integration - Comments Required

**URL:** <https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud, access-requests, identityiq\
**Created:** [June 26, 2023, 3:57pm UTC](https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341 "2023-06-26T15:57:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![questjj](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/questjj/32/25216_2.png) [@questjj](https://developer.sailpoint.com/discuss/u/questjj)\
**Post date:** [June 26, 2023, 3:57pm UTC](https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341/1 "2023-06-26T15:57:27Z")

</div>

It appears the ServiceNow Catalog Integration does not require comments on access request when an access profile has been marked as “comments required” in IdentityNow. Has anyone been able to require comments on requests that require comments on the SailPoint side of provisioning?

---

<div class="post-metadata">

**Author:** ![sharvari](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@sharvari](https://developer.sailpoint.com/discuss/u/sharvari)\
**Post date:** [June 26, 2023, 4:42pm UTC](https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341/2 "2023-06-26T16:42:17Z")

</div>

The comments on the Access Request get mapped to the Description field in Service Now during ticket creation. I haven’t tried this, but i think if you want comments to be mandatory, you may have to mark description as mandatory on Service Now side as “comments required” seems to be applicable to Sailpoint side only.

[https://documentation.sailpoint.com/connectors/servicenow/sdim/help/integrating\_servicenow\_sdim/managing\_comments\_access\_request.html](https://documentation.sailpoint.com/connectors/servicenow/sdim/help/integrating_servicenow_sdim/managing_comments_access_request.html)

---

<div class="post-metadata">

**Author:** ![questjj](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/questjj/32/25216_2.png) [@questjj](https://developer.sailpoint.com/discuss/u/questjj)\
**Post date:** [June 26, 2023, 4:55pm UTC](https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341/3 "2023-06-26T16:55:41Z")

</div>

Thanks for your reply. Ill try this, but I dont think it will solve the problem. Tracing the widget code, I can see where there is logic in place to add default comments when a user does not enter any, so comments would never actually be null.

---

<div class="post-metadata">

**Author:** ![Chri00170](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@Chri00170](https://developer.sailpoint.com/discuss/u/Chri00170)\
**Post date:** [June 26, 2023, 8:39pm UTC](https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341/4 "2023-06-26T20:39:21Z")

</div>

This worked for me:

1. In the Controller javascript, modify any code that will put a default comment in the access list requests like this: `accessListTemp9[k9].comments = "Some placeholder"` to this `accessListTemp9[k9].comments = '';`
2. In the Server Script, in the validateRequest method, in the else block where there is no RemoveData, add this after the existing line that starts with `errors = idn_validateAccess...`:

```auto
//CS - Adding validation requiring comments
                    var accessList = requestData[index1].accessList;
                    var hasEmptyComment = false;
                    if (accessList) {
                        for (var i = 0; i < accessList.length; i++) {
                            if (accessList[i].comments === '') {
                                hasEmptyComment = true;
                                break;
                            }
                        }
                    }
                    if (hasEmptyComment) {
                        errors.push('A comment is required to move forward.');
                    }

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 25, 2023, 8:39pm UTC](https://developer.sailpoint.com/discuss/t/servicenow-catalog-integration-comments-required/13341/5 "2023-08-25T20:39:34Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
