function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Leah Jones 29Leah Jones 29 

Integration issues after sandbox refresh

Hi, I want to start by stating that I am by no means a developer and am not familiar w code....that caveat out of the way, here's my quesiton:

I am fairly new to my org, and there is an integration w a 3rd party whereby they (the 3rd party) will create cases in our org when a document needs review.  When this case is created, there is a link on the case record that will take the user back to the document in the 3rd party system for the user to review.  

Once the issue w the document has been resolved, the user can then go in and close the case, either by clicking the 'Close Case' button, or changing the status to a closed status.  When this happens, there is some sort of trigger that sends a response back to the 3rd party system.  In production this is working fine, but I recently did a sandbox refresh and that 'Case Closed' response, is not being sent.  The inbound part of the integration is working whereby the cases are being created as they should be, and we can update and close, but its that last response that is not working.

I have confirmed the follwoing:
1. the remote site settings have been update to point to the dev/QA environment of the 3rd party (not production)
2. the url that is embedded on the cases when they're created are pointing to their dev/QA environment (not production)
3. There is a case trigger that is supposed to send the response back by calling a 'SendResponse' class and i believe its that part thats failing but no where in the trigger or code can i find specific reference to a url (production or QA).  

What other steps am i missing, keeping in mind Im pretty clueless when it comes to the developer console (i know how to get to it) and code in general.  

Thanks in advance for any sugggestions or thoughts you might have.  
Best Answer chosen by Leah Jones 29
Vladimir SaturaVladimir Satura
So the URL is specified in custom label (this line: 'req.setEndpoint(System.Label.DocuStarURL);').

Go to setup -> custom labels -> and find DocuStarURL. It'll probably still have production URL and not QA.

All Answers

Vladimir SaturaVladimir Satura
Hi Leah,
the URL might not be directly in the 'SendResponse' code. Can you check if URL is not specified somewhere else (custom settings)?
In code there can be reference to custom settings, or some variable like 'endpoint', try looking for that. 
If you are lost please copy code from 'SendResponse' here. At least part responsible for sending response to 3rd party (code with mentions of 'header', 'http', 'endpoint', 'request', or something similar)

Do you know how is authentication for 'SendResponse' done? Maybe credentials stored somewhere need to be updated for QA (maybe named credential or certificate).
Leah Jones 29Leah Jones 29
Hi Vladimir, thank you for your quick response!  I've checked custom settings and there's nothing there for this.  

Within the SendResponse code, there is only one reference to 'endpoint' and its this:
 HttpRequest req = new HttpRequest();
        req.setEndpoint(System.Label.DocuStarURL);
        req.setHeader('Content-Type', 'application/json');
        req.setMethod('PUT');

This really means nothing to me but these are the onlyplaces header, or endpoint are referenced.  i can paste the rest of the class here if you'd like to see it - its really long though.  
Leah Jones 29Leah Jones 29
Also, how would i check the authethentication for 'SendResponse'?  
Vladimir SaturaVladimir Satura
So the URL is specified in custom label (this line: 'req.setEndpoint(System.Label.DocuStarURL);').

Go to setup -> custom labels -> and find DocuStarURL. It'll probably still have production URL and not QA.
This was selected as the best answer
Leah Jones 29Leah Jones 29
oh wow, Custom Labels - who knew???  I could not figure out where that string was looking when referencing DocuStar URL  - thank you soo much!!