Hello NetSuite Community,
We are integrating HubSpot with NetSuite to create Invoices in NetSuite via API. During this integration, we’re trying to better understand how NetSuite handles API execution timing and whether there is any concept similar to cold start or warm start behavior.
Background
In HubSpot, custom code actions have a 20-second execution limit. If the code exceeds this limit, HubSpot automatically retries the execution.
When our integration calls the NetSuite API to create an invoice and the request does not complete within this 20-second window, HubSpot retries the request. This can result in duplicate invoices being created in NetSuite.
Questions
- Does NetSuite have any concept similar to “cold start” and “warm start” for API requests?
- For example, scenarios where the first request after inactivity takes longer than subsequent requests.
- Or differences in response time due to connection initialization, session handling, or resource allocation.
- Is there a way to determine whether a NetSuite API request is experiencing a “cold” or “warm” state?
- Are there logs, headers, or performance indicators that can help identify this?
- Any known behavior where initial API calls take longer to respond?
- What is the recommended approach to prevent duplicate record creation when API retries occur?
- Best practices for idempotency when creating transactions (e.g., invoices) via REST or SOAP.
- Whether NetSuite provides native support for idempotency keys, external IDs, or duplicate-prevention mechanisms for invoice creation.
Goal
Our goal is to design a safe and reliable integration that:
- Avoids duplicate invoices
- Works within HubSpot’s execution constraints
- Follows NetSuite-recommended API design patterns
If anyone has encountered similar scenarios or can share guidance on best practices, documentation, or architectural approaches, your insights would be greatly appreciated.
Thank you in advance for your help.