--- name: my-deals description: Show a partner's own deal pipeline with one customer — open deals by stage with amounts, plus closed-won/lost — using EULER MCP tools. Use this skill whenever a partner wants their deals view — phrases like "my deals", "my pipeline", "what deals do I have open", "my deal pipeline", "look up a deal by name". Partner-facing (a partner viewing their OWN deals); for a full self scorecard use my-performance, for a customer admin's review use generate-qbr. --- # my-deals — your deal pipeline `my-deals` is a partner-facing READ skill. It pulls a partner's own deal pipeline from the EULER platform and renders a full HTML report: open deals grouped by stage, hero quick-facts, and a distribution of deals across stages. Deeper than `my-performance`'s top-5 snapshot — this is the complete picture. --- ## When to use this skill Use `my-deals` when a partner asks about **their own deals** with a specific customer: - "my deals", "my pipeline", "what deals do I have open" - "show me my deal pipeline", "what's in my pipeline" - "look up my [deal name] deal" (named lookup → `get_search_deals`) - "how many deals do I have open", "what's my total pipeline value" **DO NOT use** for: - **Full performance scorecard** (commissions, referrals, health score) → use `my-performance` - **Customer admin reviewing a partner's deals** → use `generate-qbr` - **Submitting a new referral or deal registration** → use `submit-a-referral` - **Another partner's deals** — this skill is strictly self-scoped; only the caller's own data --- ## Account type — required: partner This skill is partner-scoped. The connected account must include a `type === 'partner'` entry. **Step 1 is always `list_accounts`.** Apply the account gate in [`references/account-gate.md`](references/account-gate.md) before calling any other tool: - Connected account has a `type === 'partner'` entry → proceed (partner context); take `partner_id` + `affiliate_company_name` from that entry. - **Customer-only connection** (no `type === 'partner'`) → emit the friendly gate message and **STOP**: "my-deals shows your own deals as a partner. You're connected as a customer admin — for a partner review use `generate-qbr`, or open your dashboard: ``." Use the `dashboard_url` from the customer entry. - Both roles → proceed as the partner (use the partner entry). `partner_id` comes **only** from the `type: 'partner'` entry — **never** from `partner_directory_search` (that returns a directory `profile_id`, rejected downstream as `partner_not_in_consent`). Translate any escaping `forbidden_scope` into the same friendly message; never show the user `forbidden_scope` or any `euler_*` code. --- ## Inputs (optional — never block) - **Which customer** — usually inferred from `affiliate_company_name` in the partner's `list_accounts` entry. If the user has multiple partner connections, ask once to clarify. - **A specific deal name** — if the user names a deal (e.g. "look up my Lumon deal"), run `get_search_deals(deal_name, partner_id)` as a supplemental lookup. Do not call it for the general pipeline view — `partner_artifacts` already returns everything. - No date range input needed — `partner_artifacts(action:'deals')` is a lifetime snapshot. Never block on missing inputs. If the user says "my deals" with no further context, proceed immediately with `list_accounts` → `partner_artifacts`. --- ## Orchestration sequence For exact response field paths, parsing quirks, and the 9999-day sentinel rule, consult [`references/mcp-field-paths.md`](references/mcp-field-paths.md). | # | Tool call | Provides | |---|-----------|----------| | 1 | `list_accounts` | Account gate + `partner_id` + `affiliate_company_name` (customer name for header). | | 2 | `partner_artifacts(action:'deals', partner_id)` | Full deal list: `Deal name`, `stage`, `Amount`, `last_stage_change_date`. | | 3 _(conditional)_ | `get_search_deals(deal_name, partner_id)` | Single-deal detail — only when the user names a specific deal. | Compute from the deals list: - Open count, open total value, avg open deal size - Closed-won count + total value - Stage distribution (count per stage) All `Amount` fields arrive as strings — parse with `Number()` before arithmetic. ### Error handling - Customer-only account → friendly gate message (see §Account type), STOP. - `partner_not_in_consent` → tell the user to disconnect + reconnect and include this account in their consent selection; do not render a partial report. - `backend_data_issue` on `list_accounts` → surface its `support_email`, note reconnecting won't help, and continue with whatever `partner_artifacts` returns. - `forbidden_scope` escaping mid-run → translate via `references/account-gate.md` into the friendly message; never surface the raw code. - `partner_artifacts` returns empty or fails → render the positive empty-state message; no crash. --- ## Product how-to questions (`euler_help`) If the user asks how EULER itself works or how to do something in the product — not about their own data — e.g. "how do I register a deal", "where do I find X in the portal", "how does onboarding work" — call `euler_help` with their question and answer briefly from its result. Do not guess about product behavior. This is a tangent to this skill's main job: answer in 1–3 sentences (no HTML report) and return to the task. ## Output format Render a **single self-contained HTML file** — no external CSS/fonts/scripts beyond the one web-font import. Opens in a browser, prints to PDF, or shares by file/link. ### How to produce the HTML 1. Read [`assets/styles.css`](assets/styles.css) and inline its **FULL** contents into a single `