Every credit-back meant digging through logs and distributions
When a lead assignment needs to be credited back to a rep, someone has to find the original routing event, identify the right distribution and rep, then apply the adjustment by hand.
It's a small task, but it comes back again and again, and getting the distribution wrong means crediting the wrong rep.
Frontify already runs its lead routing on Chili Piper, the switch that took its lead-to-intro conversion to 85%.
A credit-back skill built on the Chili Piper MCP
Alex von Stegmann, RevOps at Frontify, wrote a reusable skill that runs in Codex, connected to the Chili Piper MCP.
// Alex starts with the prospect's email address and the credit-back skill.
- Ask. Alex gives the prospect's email address and asks for a credit back.
- Trace the routing history. The skill searches the routing logs and separates the original assignment from later SLA follow-ups based on current ownership.
- Resolve the distribution and rep. It matches the route to a specific distribution by name and ID, then confirms the rep.
- Apply and verify. Once the target is confirmed and the credit authorized, it applies it through manual calibration, re-reads the distribution and reports what changed.
If it can't match the original assignment to a distribution with confidence, it stops before changing anything.
// The skill finds the original assignment and keeps the later SLA activity separate.
"For me, that's what makes this a useful MCP example: a small operational task that becomes easier to repeat reliably."
β Alex von Stegmann, RevOps, Frontify
// The result: route, distribution, rep and adjustment, verified after the change.
The Toolbox
- Codex: the client Alex runs the skill in
- Chili Piper MCP: reads routing logs and distributions, applies the calibration
- Credit-back skill: describes the steps and safety checks
- Managed plugin: shares the skill with the whole RevOps team
- Slack bot (planned): to trigger the skill without opening Codex
Next: a Slack trigger
Frontify is looking at triggering the skill from a Slack bot action to fully automate the flow. It's a lower-priority improvement, so it isn't built yet.
What he'd tell the next builder
The hardest part was identifying the correct historical distribution. A lead can have several routing events, and the latest one might be an SLA follow-up based on current ownership. Build the skill to tell those apart, and to stop when it can't.
The Results
- Credit-backs start from a single email address, instead of navigating logs and distributions by hand
- The same checks every time on the rep and the distribution, followed by a verification of the adjustment
- Shared with the whole RevOps team through a managed plugin
Get the recipe
Alex shared his skill so other teams can adapt it. Swap the example router names (SLA Lead router, Concierge - ... - Booked) for your own.
---
name: chili-credit-adjuster
description: Audit a lead or prospect's Chili Piper routing history and apply a verified manual-calibration credit adjustment to the AE's actual corresponding distribution. Use for requests to credit back, debit, or otherwise adjust routing credits for a specific lead or prospect while preserving unrelated calibration and routing configuration.
---
# Chili credit adjuster
Use Chili MCP to identify who actually received a lead and adjust only the matching distribution.
## Workflow
1. Resolve the lead's routing history before changing anything.
- Search `mcp__chili_mcp_read_only__distro_logs` across all workspaces when the workspace is unknown.
- Search by prospect email first; use the Salesforce entity ID from the result for follow-up searches.
- Inspect the relevant record with `mcp__chili_mcp_read_only__distro_log_get`.
2. Separate the current SLA follow-up from the original routing.
- Do not treat an SLA follow-up router as the original distribution route. `SLA Lead router` is an example label; use the actual SLA router name in your setup.
- Inspect the latest non-SLA route with a real assignment.
- If the trace contains a prior Concierge booking label, use that as the original route and resolve its meeting distribution. `Concierge - ... - Booked` is an example label; adapt it to your own naming.
- Treat an SLA assignment with `method: FromOwnershipArs` and `distributionId: null` as ownership routing, not a distribution assignment.
3. Resolve the exact distribution and AE.
- Use `mcp__chili_mcp_read_only__distribution_list_put` with the relevant workspace, assignment type, and a narrow name search.
- For Concierge bookings, use assignment type `Meeting`; for Distro record routes, use `Record`.
- Match the distribution name and ID to route evidence. Never infer a distribution from a similarly named region or segment.
- Resolve the assigned Chili user with `mcp__chili_mcp_read_only__user_find_by_ids` and confirm display name and email.
4. Require explicit authorization immediately before mutation.
- Treat a request such as "apply a -1 credit for the rep" as authorization for exactly one signed delta for that AE in the verified distribution, provided the request unambiguously identifies the rep.
- Never change routing rules, weights, team membership, or unrelated calibration entries.
- If no corresponding distribution is verified, do not mutate. Report the owner route and ask for a specific distribution if the user wants a manual adjustment.
5. Apply the requested delta with `mcp__chili_mcp_write__distribution_adjust_v3`:
{"distributionId": "<verified distribution id>", "body": {"manualCalibration": [{"userId": "<verified AE user id>", "adjustment": -1}]}}
Treat this as a delta merge. Preserve all omitted users and existing calibration entries.
6. Verify the live result.
- Re-read the same distribution with `distribution_list_put`.
- Confirm the named AE's `published.manualCalibration` and state `calibrationDelta` reflect the requested signed adjustment or cumulative result.
- Report the lead, route, distribution name and ID, AE, adjustment, and verification result.
## Safety boundary
Chili logs can expose a current SLA owner while the original Concierge distribution is represented only by a prior routing label. Treat those as separate facts. If the historical Concierge distribution or assignee cannot be matched confidently, stop before writing.
Have an idea? Start here
Building something with the Chili Piper MCP? Join the GTM Clawllective and share what you've built.
In the meantime, stay spicy! π₯