Common ServiceNow REST and SOAP Integrations Mistakes and How to Avoid Them
A REST or SOAP integration in ServiceNow fails in a small set of repeatable ways, mostly around credentials, data mapping, error handling and rate limits. This page sets out each mistake with its symptom, root cause and fix, and helps an integration engineer check a design before release.
Authentication and Credential Management Mistakes
Mistake: Storing API credentials (API keys, usernames, passwords) in integration scripts or configuration pages visible to administrators. Anyone with access to the script can read the credentials.
Symptom: API integration is working, but the credentials are compromised when an admin leaves and their account is removed.
Root cause: Convenience; embedding credentials in scripts is simpler than setting up credential storage, but it is a security anti-pattern.
Fix: Store all API credentials in ServiceNow’s Credential [sys_credential] table. Scripts reference the credential record by name, not the actual password. Restrict access to the Credential table so only integration processes can read credentials.
Data Synchronization and Mapping Errors
Mistake: Assuming field names and data types are the same across systems. System A returns a date as year, month, day, and System B expects day, month, year, so the transformation has to reorder the parts.; System B expects “10-05-the current year”. System A represents status as “open”, “pending”, “closed”; System B uses “new”, “assigned”, “resolved”.
Symptom: Data is pulled from System A and loaded into System B. Dates are incorrect, status fields are mismatched, and data quality is poor.
Root cause: Insufficient data mapping before integration. Developers assumed field names and formats were standard across systems.
Fix: Document field mappings before writing integration code. For each field in System A, identify the corresponding field in System B. Define transformation rules (date format conversion, status mapping). Test the transformation with real data before deployment.
Inadequate Error Handling
Mistake: Integration code that calls an API and assumes success. If the API returns an error (timeouts, rate limits, validation errors), the integration fails silently or logs an error without alerting anyone.
Symptom: Integration ran last night and failed. No one noticed until the next day when users reported data was not synchronized.
Root cause: No error handling or alerting. Integration processes run in the background; if they fail silently, failures go undetected.
Fix: Every API call should handle potential failures. If an API call fails, log the error with context (which record failed, which API, what error), alert operations, and requeue the request for retry. Implement monitoring and alerting for integration failures.
Rate Limiting and Throttling Failures
Mistake: Polling an API as fast as possible without respecting rate limits. Many APIs allow only 100 requests per minute. An integration that makes 1000 requests per minute gets throttled or blocked.
Symptom: After a few days, API calls start failing with “too many requests” errors, or the integration gets IP-blocked.
Root cause: Ignoring or not aware of API rate limits.
Fix: Read the API documentation and understand rate limits. Implement exponential backoff (retry after 1 second, then 2, then 4, etc.) when rate limits are encountered. Configure integration jobs to batch requests and spread them over time rather than making many requests in rapid succession.
Incomplete Testing and Production Rollout
Mistake: Testing integration in a development environment with small data volumes, then deploying to production where data volume is 100x larger. Integration works in dev, times out in production.
Symptom: Integration is deployed Friday afternoon and fails immediately in production. Weekend support is needed to fix it.
Root cause: Insufficient testing with realistic data volumes and timing.
Fix: Test integrations with production-like data volumes. Test with concurrent requests (if multiple processes call the API simultaneously). Test failure scenarios (API is down, returns errors). Have a rollback plan for production deployment; be ready to revert if issues arise.
Versioning and API Deprecation Handling
Mistake: Building integration against an API version without tracking versions or planning for API changes. The API vendor deprecates the version, the API changes, and the integration breaks.
Symptom: An API change breaks an integration and no one notices until tickets start coming in.
Root cause: No process for monitoring API changes or planning for upgrades.
Fix: Subscribe to API vendor change notifications. Document which API version is in use. Plan API upgrade/migration projects when vendors deprecate old versions. Test new API versions in a sandbox before upgrading production.
Documentation and Knowledge Transfer
Integration documentation should describe what the integration does, which systems it connects, what data is synchronized, error handling approach, and how to test it. When an integration engineer leaves, documentation ensures continuity. Document API endpoints, authentication method, data transformation rules, and failure recovery procedures. Update documentation when integrations change; stale documentation is worse than no documentation.
Where the platform itself causes integration failures
Much REST and SOAP trouble that reaches a ServiceNow administrator starts inside the platform rather than in the remote system. The remote endpoint answers, the call technically succeeds, and still a record ends up duplicated, a form freezes for the person saving it, or a scheduled job stops doing its work without anyone being told. The mistakes below come from how the instance is configured. They are separate from the design problems of the external API, and they are often the ones that surface first in production.
Calling an external endpoint from inside a save
A common shortcut is to place an outbound call in a before business rule, so that a value from the other system is ready the moment a record is saved. The call then runs inside the save transaction. When the remote service is slow, the person saving the record waits, and when it fails, the save can fail with it. Move the call out of the transaction wherever the business can continue without the answer. An after business rule that queues the work, a flow action that runs once the record has committed, or a scheduled job that collects pending updates all keep the form responsive. Keep a synchronous call only where the process genuinely cannot proceed without the reply, and write that decision down in the design record.
Outbound messages running under the wrong identity
Teams often build the outbound call while signed in as an administrator, then test it under that same account. The integration works in testing and fails in production when the call runs under a context that lacks read or write access to one table or one field. The opposite failure is also common: the call runs as a named person’s account, and the integration stops the day that person changes role. Decide which identity makes each call before building it. Use a dedicated integration user, write its table and field access into the design record, and reference the credential through a credential alias so the secret never sits in the REST message itself.
Retries that create a second copy of the record
When a create request times out, the sender often cannot tell whether the receiving system saved the record. A retry then produces a duplicate. The defence is a stable external reference sent with every create, such as the sending system’s own identifier, stored in a dedicated correlation field on the ServiceNow record. The inbound logic then looks for that reference before it inserts, so the second attempt becomes an update. Treat this as a property the integration must prove in testing, because the transport layer does not provide it.
Reading values without controlling their shape
The Table API returns reference fields, choice values and date fields in forms that depend on the query. A consumer that does not set the display-value option explicitly can receive an identifier in one environment and a label in another, and the mismatch shows up weeks after go-live. Date and time values can also differ from what users see in the interface, so a comparison of raw strings reports changes that never happened. Set the display and field parameters explicitly, request only the fields the consumer needs, and page through large result sets with a limit and an offset instead of pulling a whole table in one request.
Choosing the mechanism for each side of the call
| What the integration needs | Mechanism teams often reach for | Where it breaks | Safer choice |
|---|---|---|---|
| A value before a record is saved | Outbound call in a before business rule | A slow remote service holds up the save | A cached lookup, or an asynchronous step after commit |
| Inbound writes for one record type | Table API with a shared, broad account | Hard to audit, and access is wider than needed | A scripted REST endpoint guarded by a dedicated role and ACL |
| Loading many rows in one run | Repeated single-record calls in a loop | Hits the remote limits and runs slowly | An import set with a transform map, or paged reads |
| Telling another system about a change | A business rule that sends on every update | A bulk edit floods the remote system | A trigger on the specific change, with batching |
| Recovering from failed calls | Re-running the whole job from the start | Creates duplicates for rows already processed | Keyed retries and a list of failed items |
An ordered pre-release check
- Confirm which identity makes each outbound and inbound call, and that the identity holds exactly the access in the design record.
- Confirm each external call sits outside the save transaction unless the design record justifies it.
- Confirm every create carries a stable external reference and that a lookup runs before the insert.
- Confirm each query sets the display and field parameters explicitly.
- Run one bulk test with a deliberate failure in the middle of the batch, then check for duplicates and for rows that were skipped without a log entry.
When the symptom points at the platform
Start with the platform’s own records before you open the remote team’s logs. Outbound HTTP request records and the system log show whether a failure was a timeout, a rejected credential, or a response the script could not parse. Teams that read only the remote logs can spend a long time on a problem a single ServiceNow log line would have located. If the script raised an error after a valid response arrived, the endpoint is healthy and the defect is in the parsing code.
Questions teams ask after the first failure
Can a before business rule ever call an external system safely?
Occasionally. A short call against a cached or highly reliable endpoint, with a defined fallback when it fails, can justify it. Without a fallback, a remote outage becomes an outage of saving records, so the decision should be reviewed by whoever owns the form.
Why do duplicates appear only after a network problem?
Duplicates need two things: a request the sender treats as failed and a receiver that saved it anyway. Network interruptions produce exactly that gap. Without a correlation field and a lookup before insert, every retry becomes a new record.
Should the integration run under a named person’s account?
No. A personal account ties the integration to that person’s employment, role and password policy. A dedicated integration user with documented access is easier to audit and to rotate.
Where should I look first when a scheduled import stops without an error?
Check whether the job is still scheduled to run, whether it is waiting behind another job, and whether the last run finished or was cut short. A job that silently stops is often one that was disabled or stuck, not one that failed.
Get the failing configuration reviewed
If an integration already misbehaves in one of these ways, a review of the live configuration often finds the cause faster than another round of guesses. The note on error handling covers the retry side in more depth, and the explainer on outbound REST messages sets out how the call is built. The enterprise platform integrations page describes the scope of wider delivery support.
Frequently asked questions
How should we handle API calls that take a long time to complete?
For API calls that can take minutes or hours, implement async patterns. The integration submits a request and receives a job ID, then polls for job status. Polling avoids timeouts and allows the integration to proceed with other work. Store the job ID so the integration can check status later.
What is a reasonable timeout for API calls?
Response time depends on the API. If an API takes noticeably longer than expected, it might be slow or broken. Configure timeouts and retry logic: if the first call times out, wait and retry. Set a maximum retry count to avoid infinite retries.
Should we build custom integrations or use vendor APIs?
Always prefer vendor APIs if available. APIs are supported and documented; custom integrations break when systems change. If no API is available, custom integration via web scraping or database access is your fallback, but it is fragile.
Related guides
Related Oblytech services
Where this topic turns into delivery work, these are the Oblytech services that cover it.
Planning, running or fixing a ServiceNow programme? Tell us where you are and we will suggest a sensible next step.
Contact us