Issue
When attempting to route events to multiple instances of the Salesforce Actions destination simultaneously from a single source in Twilio Segment, users encounter a RESOURCE_LOCKED or INVALID_SESSION_ID error stating that the "Segment Integration is locked". This issue occurs when concurrent events are dispatched to multiple connected Salesforce destination instances at the same time.
Product
Twilio Segment
Environment
Segment Console
Cause
The issue is caused by a limitation on the Salesforce side. Salesforce restricts a single set of login credentials to a maximum of 5 active sessions at any given time.
When you connect more than 5 Salesforce destination instances across your Segment workspaces using the same credentials, simultaneous event streams trigger concurrent API requests. Salesforce blocks these synchronized loads to prevent account concurrency issues, resulting in expired sessions and locked resource blocks.
Resolution
To resolve this issue and prevent session collisions, you must manage your concurrent connections and event routing using the following steps:
Audit Your Connections: Review your Segment workspaces to count how many active Salesforce destination instances are utilizing the exact same Salesforce login credentials.
Consolidate Salesforce Destinations: Ensure that you have a maximum of 5 active Salesforce destination instances connected to that specific Salesforce organization credentials set across all combined sources.
Additional Information
Note: This 5-destination limit is enforced at the Salesforce Org level based on your API login credentials, meaning it spans across your entire Salesforce environment regardless of how many different Segment workspaces you have configured.