Engagement Messenger fails to load (Error in loading)

Giovanni Ragosa
ServiceNow Employee
ServiceNow Employee

Hey all, 

I get this message on the customer site:

Access to XMLHttpRequest at 'https://romedemomed.service-now.com/api/sn_csm_ec/engagement_center_api/modules/959c8ea287424110e27a400e8bbb356d' from origin 'https://www.payoneer.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
romedemomed.service-now.com/api/sn_csm_ec/engagement_center_api/modules/959c8ea287424110e27a400e8bbb356d:1 Failed to load resource: net::ERR_FAILED

I am doing the exact same things on other sites and it works, i am following the guide to set it up. Is this a protection policy on the customer side?

 

3 REPLIES 3

Community Alums
Not applicable

Hi @Giovanni Ragosa ,

 Pick the scripted rest API name from REST API drop down in CORS rule.

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Hi Sandeep, 

please can you elaborate a little bit? i did not get what i have to do

The selected API in CORS Rules is Engagement Center API , as shown in the config guide

dunstanchristop
Tera Contributor

I had to deal with this its in the  sys_cors_rule table.  You have to create an ACL-type rule for the API the engagement messenger is using.

You are specifying what type of action are you allowing the external system to use on the rest API endpoint POST/GET/PUT/DELETE/PATCH and what is the origin of the call (https://<app domain ) listed in the domain field i.e. who is calling across domains to your instance.

 

In your case, the rest API is Engagement center API i.e. endpoint <your instance>/sn_csm_ec/engagement_center_api

 

Also, the relevant HTTP response header should also be updated sys_response_header. This is part of the CORS rule configuration as to how the response from ServiceNow is translated.

This will be updated with frame-ancestors 'self' https://<app domain the engagement manager is deployed>.com

 

Both are entered without the / at the end.

HTH for anyone looking at it from 2023