How can we connect to salesforce via REST API without losing connection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 03:27 AM
We are trying to do an update on Salesforce through REST API + Business Rule, so we have created a REST message (Salesforce REST), with a HTTP Method (Default GET).
If we manually force getOauthToken (click on the link that says "get Oauth token"), and we execute the business rule (which has a part of Javascript code we've developed), it works perfectly. The problem lies on the following attempts to connect again after some minutes, that throws the error attached to this case.
We would like to connect instantly through Javascript so this business rule can be executed everytime we close a ServiceNow ticket.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 04:21 AM
to be honest without having access to required system its hard to know exactly whats failing , am assuming you are not using exactly this script and this is a sample of what the actual one is with proper variables already substituted , right ? if that's the case seems like SF is saying you are missing some crucial headers ! in that case you will have to refer SF api docs and if you have any contacts of the team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 12:23 PM
Hi Javier did you find the solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 12:49 AM
Hi Javier
Please share the logs so I can dig deeper in this use-case.
For now for this use-case of establishing an instant connection and ensure a smooth execution of the business rule every time a ServiceNow ticket is closed, I would consider an integration tool like Exalate. It is fully decentralized, I have been using it for quite a long time and it works amazingly fast for these type of things.