/api/journey_sequencesPOST https://api.Fluxrails.app/api/v1/ai/journey_sequences
X-Customer-Api-Id: <uuid>
X-Secret: <secret>
Content-Type: application/json
// Request Body Schema
{
"min_support": integer, // Minimum absolute count for a path to qualify
"max_len": integer, // Maximum prefix length to mine
"sessions": [
{
"session_id": "string", // For tracebacks only
"user_id": "string", // Optional, to dedupe across devices
"steps": [ // Ordered list of page/event labels
"string", …
],
"converted": 0|1 // Optional, for downstream slicing
}
]
}
// Example Request Body
{
"min_support": 30,
"max_len": 4,
"sessions": [
// 60×: Home → Category → PDP → Cart → Conversion
{ "session_id": "S-001", "user_id": "U-001", "steps": ["Home","Category","PDP","Cart","Conversion"] },
// … repeat for S-002 through S-060 …
// 40×: Home → Search → PDP → Cart → Conversion
{ "session_id": "S-061", "user_id": "U-061", "steps": ["Home","Search","PDP","Cart","Conversion"] },
// … repeat for S-062 through S-100 …
// 30×: Home → Category (drop-off)
{ "session_id": "S-101", "steps": ["Home","Category"], "converted": 0 },
// … repeat for S-102 through S-130 …
// 30×: Home → Search → PDP (drop-off)
{ "session_id": "S-131", "steps": ["Home","Search","PDP"], "converted": 0 },
// … repeat for S-132 through S-160 …
// 20×: Home (bounce)
{ "session_id": "S-161", "steps": ["Home"], "converted": 0 },
// … repeat for S-162 through S-180 …
// 20×: Home → Promo → PDP → Cart → Conversion
{ "session_id": "S-181", "user_id": "U-181", "steps": ["Home","Promo","PDP","Cart","Conversion"] }
// … repeat for S-182 through S-200 …
]
}
// Example Response Body
{
"frequent_paths": [
{ "path": ["Home"], "support": 200 },
{ "path": ["Home","Category"], "support": 90 },
{ "path": ["Home","Search"], "support": 70 },
{ "path": ["Home","Search","PDP"], "support": 70 },
{ "path": ["Home","Category","PDP"], "support": 60 },
{ "path": ["Home","Category","PDP","Cart"], "support": 60 },
{ "path": ["Home","Search","PDP","Cart"], "support": 40 }
],
"interpretation": "Top path **Home** appears 200×. Use these frequent prefixes to inform site navigation, personalization, and next-best-action rules."
}
• Mines all prefix-closed sequences up to `max_len` from your session data. • Prunes any prefix with total occurrences < `min_support`. • Returns the most common user journeys (by raw count), sorted descending. • Provides a one-sentence summary highlighting the #1 path and a next-step nudge.
• Identify dominant user flows for conversion rate optimization (CRO). • Power on-site personalization by triggering content based on top prefixes. • Compare frequent patterns across cohorts (e.g. converted vs. non-converted). • Tune minimum support and path length to balance noise vs. insight granularity.
← Back to all routes