Hi all,
We are experiencing a persistent InvalidCampaign error (HTTP 400) when attempting to automatically enroll leads into an Outbound Campaign immediately after their creation in ServiceNow. Our architecture utilizes a ServiceNow Script Include to POST to a Genesys Cloud Data Action endpoint upon record insertion. The Data Action is configured to execute a REST API call to the /api/v2/campaigns/outbound/{campaignId}/contacts endpoint.
The issue is intermittent but correlates with high-volume sync periods. The payload sent to the Data Action contains the correct campaignId and contact attributes (email, phone, custom fields). However, the Genesys Cloud audit logs show the Data Action failing with a 400 Bad Request before the actual outbound API call is attempted, suggesting the failure occurs during the Data Action’s internal validation phase or the initial handshake with the Outbound service.
Environment Details:
- Genesys Cloud Region: eu-west-1 (London)
- Data Action Version: v2
- ServiceNow Version: Washington DC
- Outbound Campaign Type: Predictive
I have verified that the integration user has the outbound:campaigns and outbound:contacts scopes. Interestingly, manual enrollment of the same contact via the Genesys Cloud UI succeeds without error. Furthermore, if I introduce a 5-second delay in the ServiceNow script before triggering the Data Action, the success rate increases significantly, leading me to suspect a potential race condition regarding contact provisioning status or campaign state consistency.
Has anyone encountered similar latency issues with real-time contact enrollment via Data Actions? Are there specific headers or retry logic recommended for the Outbound API when called synchronously from a Data Action? I have cross-referenced the developer documentation for rate limits but do not see a specific constraint on the enrollment endpoint that would cause a 400 rather than a 429.