Issue
If you are using the Iterable Actions Destination in Segment you may encounter errors such as:
400 Bad Request (invalid userId (empty)), 409 Conflict (ExternalKeyConflict)And payload validation errors like
Email Address must be a valid email address string but it was not. These errors can prevent successful event delivery to Iterable.
Product
Twilio Segment
Environment
Segment Console
Cause
-
400 Bad Request (invalid userId (empty)):
This occurs when the Iterable project is configured to require auserId, but the Segment mapping does not provide one. Even if the mapping UI marksuserIdas optional, Iterable may still require it based on project settings. -
409 Conflict (ExternalKeyConflict):
This error appears when auserIdsent from Segment already exists in Iterable, causing a conflict during user creation or update. -
Payload Validation Failed (Email Address):
This happens when the event payload does not include a valid email address string, or the mapped field is empty or incorrectly formatted.
Resolution
-
Map the userId Field:
- In your Segment destination mapping for Iterable, ensure that
userId(or a unique identifier such ascontext.traits.userId) is mapped to the User ID field for both Identify and Track actions. - If your Iterable project is intended to be Email-based only, update the project settings in Iterable to reflect this.
- In your Segment destination mapping for Iterable, ensure that
-
Resolve 409 Conflict Errors:
- Check your Iterable instance for duplicate profiles with the same
userId. - Clean up or merge duplicate user profiles as needed.
- Ensure your mapping logic does not attempt to create users with an existing
userId.
- Check your Iterable instance for duplicate profiles with the same
-
Validate Email Address in Payload:
- Confirm that all incoming events include a valid email address string.
- Update your mapping formula (e.g.,
coalesce(properties.email, context.traits.email)) to ensure it always resolves to a valid email address.
Additional Information
- Even if the Segment UI marks
userIdas optional, Iterable’s project settings may override this and require the field. - For more details, see the Segment documentation for Iterable Actions Destinations.
- If you continue to experience issues, review your source event structure and mapping configuration, or contact support for further assistance.