Build Channel99 app navigation URL
buildAppNavigationUrlFull Description
Constructs a URL to navigate the user to a specific page in the Channel99 application.
⚠️ PREREQUISITE: You MUST call the listAppRoutes tool first to obtain the available routes and their parameters before constructing any URLs. Do not guess or hallucinate route names or parameter names.
CRITICAL WORKFLOW
- YOU MUST FOLLOW THIS ORDER:
STEP 1: Identify the route without calling the buildAppNavigationUrl tool. STEP 2: Call the resolveObjectIds tool for ANY parameter that "requires lookup". STEP 3: Wait for the response from the resolveObjectIds tool to return the actual IDs. STEP 4: Call the buildAppNavigationUrl tool using the EXACT IDs returned by the resolveObjectIds tool.
⚠️ EXCLUSION / NEGATION HANDLING:
When the user uses these keywords, you MUST set exclude: true:
- "NOT in", "not in"
- "except", "excluding"
- "other than"
- "but not", "without"
- "exclude"
ONLY parameters marked "can be excluded" support the exclude property (string and string[] types only).
EXAMPLES: ✓ "companies NOT in Audience A" → w.audienceIds: {value: "<ID>", exclude: true} ✓ "all sectors except healthcare" → w.sector.id: {value: "sect_healthcare", exclude: true} ✓ "channels other than direct" → w.channelIds: {value: "chnl_direct", exclude: true} ✗ "visits NOT equal to 10" → Use range filter instead: w.metrics.visits: {value: "[,9]"} or {value: "[11,]"}
CRITICAL: When you see "NOT" or "except" in the query, CHECK if that parameter "can be excluded" and set exclude: true.
⚠️ COMMON MISTAKES TO AVOID:
1. ✗ Calling buildAppNavigationUrl before calling resolveObjectIds ✓ Always call resolveObjectIds FIRST, wait for response, THEN call buildAppNavigationUrl
2. ✗ Guessing IDs based on patterns (e.g., "audi_nebula_test", "sect_healthcare") ✓ Use the EXACT ID returned by resolveObjectIds, which might be complex like "audi:seeddata.upload.audience-1"
3. ✗ Using example IDs from documentation ✓ Call resolveObjectIds to get the real ID for the user's specific entity
4. ✗ Omitting filters when the user mentions filtering criteria ✓ Always include searchParams for any filtering criteria mentioned by the user
WHY YOU CAN'T GUESS IDS:
- IDs can be simple: "sect_healthcare", "chnl_direct"
- IDs can be complex: "audi:seeddata.upload.audience-1", "inst:customer_abc.prod"
- IDs can be UUIDs: "550e8400-e29b-41d4-a716-446655440000"
- Only resolveObjectIds knows the actual format for each entity
Example 1: "Where can I see more information on the 'My Audience 123' audience?" ✗ WRONG: pathParams={} ✓ CORRECT: pathParams=[{key: "audienceId", value: "<ID_FROM_LOOKUP>"}]
Example 2: "Show me all vendors which belong to the paid search channel?" ✗ WRONG: searchParams={} ✓ CORRECT: searchParams=[{key: "v.channel.id", value: "<ID_FROM_LOOKUP>"}]
COMPLETE WORKFLOW EXAMPLE:
User Query: "Show me healthcare companies in Europe with more than 10 visits that are NOT enterprise"
Step 1: Call listAppRoutes to get available routes and parameters → Identify the route: webTrafficActivity
Step 2: Identify what needs lookup → "healthcare" needs lookup (type: sector) → "Europe" needs lookup (type: region) → "more than 10 visits" is a range filter (no lookup needed) → "enterprise" needs lookup (type: revrange)
Step 3: Call resolveObjectIds tool: Input: { entities: [ {name: "healthcare", objectType: "sector"}, {name: "Europe", objectType: "region"} {name: "enterprise", objectType: "revrange"} ] }
Response: [ {id: "sect_healthcare", name: "Healthcare", objectType: "sector"}, {id: "regn_europe", name: "Europe", objectType: "region"} {id: "rrng_enterprise", name: "Enterprise", objectType: "revrange"}, ]
Step 4: Call buildAppNavigationUrl tool with the EXACT IDs from Step 3: Input: { route: "webTrafficActivity", searchParams: [ {"key": "w.sector.id", "value": "sect_healthcare"}, ← ID from resolveObjectIds response {"key": "w.region.id", "value": "regn_europe"}, ← ID from resolveObjectIds response {"key": "w.metrics.visits", "value": "[10,]"}, ← No lookup needed {"key": "w.revRange.id", "value": "rrng_enterprise", "exclude": true} ← ID from resolveObjectIds response, exclude: true ] }
Response: "https://app.dev.channel99.com/app/inst/seeddata/web-traffic-activity?w.sector.id=sect_healthcare&w.region.id=regn_europe&w.metrics.visits=[10,]"
Parameters (1 required, 2 optional)
routestringThe route key identifying which page to navigate to. Must be one of the available routes returned by the listAppRoutes tool.
pathParamsarrayPath parameters as key/value entries (e.g. [{key: "audienceId", value: "<ID_FROM_LOOKUP>"}]). Use resolved IDs from any parameters which require lookup. Type formatting rules: 1. string[]: comma-separated list of values 2. enum: one of the allowed values in the enum field 3. string: a single value 4. number: a valid number value
searchParamsarrayQuery string parameters for filtering, sorting, etc. ⚠️ EXCLUSION: If the user says "NOT", "except", "excluding", or "other than", you MUST set exclude: true - Only works for parameters marked "can be excluded" (string and string[] types) - Example: "NOT in Audience A" → [{"key": "w.audienceIds", "value": "<ID_FROM_LOOKUP>", "exclude": true}] - Example: "except healthcare" → [{"key": "w.sector.id", "value": "<ID_FROM_LOOKUP>", "exclude": true}] Use resolved IDs for any parameters which require lookup. Type formatting rules: 1. string[]: comma-separated list of values 2. range: [10,] means >= 10, [,20] means <=20, [10,20] means >= 10 and <= 20. Only square brackets are allowed NOT parentheses. 3. enum: one of the allowed values in the enum field 4. boolean: true or false 5. ruleBased: OR queries are comma-separated, AND queries are separated by + 6. string: a single value 7. number: a valid number value EXCLUDE: Set the exclude property to true to exclude the value instead of including it. Only applicable to string and string[] types which "can be excluded". Examples: - Include: {"key": "w.region.id", "value": "regn_europe" } - Exclude: {"key": "w.region.id", "value": "regn_europe", "exclude": true } Use exclude when the user says "NOT", "except", "excluding", "other than", etc.