SDK API Reference / journeySegmentRequestToComposable
Function: journeySegmentRequestToComposable()
journeySegmentRequestToComposable(
request):CreateComposableSegmentRequest
Translate a journey-local segment create request from the complete-side shape to the composable one, field for field.
The two APIs describe the same thing with different names, and getting any of them wrong fails silently rather than loudly — Rails strong params drop what they do not recognise, leaving a segment with no rule, no folder, or no owning journey:
audienceId→composableAudienceIdjourneyId→composableJourneyId, together withkind: 'journey', which is what makes the segment journey-owned (type: composable-segment-journeyis the JSON:API spelling of it)parentFolderId→segmentFolderId
countPopulation is deliberately not carried over: it has no composable counterpart, and population for a composable segment is computed against the customer's own warehouse.
Parameters
request
CreateJourneySegmentRequest
Returns
CreateComposableSegmentRequest