+ Start a Discussion
Shailesh DeshpandeShailesh Deshpande 

Problems while making two back to back web service Callouts.



I have an object called PR. I have an after insert trigger on this object. This trigger has two batch classes within it, both of which make a callout to Zendesk Api. The problem i am facing is that i am not recieving a response for one of the callout. Sometimes i recieve the proper response for the callout made in 1st batch class and for the callout from 2nd batch class i recieve null in response while other times its reverse case. i.e response is null for the 1st callout and for 2nd callout i get proper response.And sometimes i get both the response correctly... I am facing this issue since last 2-3 days, however a week before everything was working fine.


Not sure whats wrong. Is that because i am making two back to back webservice callout? Or is it that there needs to be some time gap between two callouts?


Any help/suggestion is appreciated.



Thanks in advance.




Check Zendesk Api server log you can get some clue.Are you sure Zendesk Api server working properly now.

Shailesh DeshpandeShailesh Deshpande

I changed my trigger to (after insert, after update) . I dont face any problem when the record is updated(I get both the responses). But if i insert the record, i still have the above problem. If theres an issue with ZD/my code then i should not recieve the response when i update the record.