Cart API Query - Integration failing between two instances
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2023 11:45 PM
I am working on an integration between two ServiceNow instances and using the following Cart script to manage this integration (using a custom remote table, transform map and script)
Instance A is non-domain separated instance with multiple customers interacting through their individual service portals to get IT support.
Instance B is a domain separated environment with 4 customers having their dedicated domains.
When a RITM gets created in Instance B which needed to be integrated to Instance A, using the OOTB Cart API, I am able to integrate the ticket and furthermore all updates happen through various custom flows appropriately.
But when I am trying to integrate RITM created in Instance A for a specific customer who is having a dedicated domain in Instance B, the integration fails because of the missing domain in the original request created in Instance A.
System logs captures the following error:
com.glideapp.servicecatalog.exceptions.CartException: Your cart has item(s) belonging to the 'ABC Company' domain. Please change the domain to continue with the checkout.: org.mozilla.javascript.JavaScriptException: com.glideapp.servicecatalog.exceptions.CartException: Your cart has item(s) belonging to the 'ABC Company' domain. Please change the domain to continue with the checkout.:
In Cart script, instead of passing the sys_id of the catalog item, I am querying the generic request sys_id from respective domains and passing it on to the script as a variable.
Not sure what am I doing wrong or how should I approach on this issue to resolve the domain exception error.
Just to mention, Request is being created in the correct domain, but the RITM and/or TASKs goes missing