--- # Default customer-profile template. # Copy to a Volume, edit, and point CR_PROFILE_TEMPLATE_PATH at it to customize. # Two declared data sources, both optional: # * feature_deviation — top-N deviation rows (right-hand panel; SHAP placeholder) # * customer — single profile row (left column; override per dataset) # Either source returning empty is rendered gracefully — the section just hides. data: feature_deviation: source: "v_account_feature_deviation_topn" join_key: "entity_id" order_by: "deviation_rank ASC" limit: 12 as_list: true ---
{{#if playbook_name}} {{/if}}
Customer

{{entity_id}}

{{risk_tier}} risk tier
{{fmt_pct churn_probability}} churn probability
Value at risk {{fmt_currency value_at_risk}}
Expected loss {{fmt_currency expected_loss}}
Policy rank {{fmt_int policy_rank_among_eligible}}
Eligible plays {{fmt_int eligible_playbook_count}}
{{#if customer}}
Customer

Profile

A dataset-specific template is loaded but did not declare any visible fields. Edit the template's frontmatter and HTML to surface the fields your CSMs need.

{{else}}
Customer profile not configured

Dataset-specific panel pending

No customer data source is declared in the active template. Two things to check:

  1. The apply_profile_override(...) cell in c05_snapshot_and_dashboard has run on the cluster, so the per-dataset HTML is published at /Volumes/<cat>/<sch>/dashboard_templates/<dataset>_profile.html. The app auto-discovers the newest .html there — no env var needed.
  2. If you want to pin a specific file, set the Databricks App env var CR_PROFILE_TEMPLATE_PATH — it overrides the auto-discovered template.

See docs/ech_notebook_ux_overrides.md (email-churn) or docs/sps_notebook_ux_overrides.md (SPS) for the ready-to-paste cells.

{{/if}}
{{#if account_top_shap_features}}
Why the model flagged this account

Top SHAP drivers

Each bar's length shows the magnitude of the feature's contribution to this customer's churn score, normalised to the strongest driver in the row. Red pushes the score toward churn; green pushes it away.

    {{#each account_top_shap_features}}
  • {{this.feature}} {{fmt_shap_value this.value}} {{fmt_signed_shap this.shap_contribution}}
  • {{/each}}
{{/if}} {{#if feature_deviation}}
Vs. training population

How this customer compares

Bars show z-score vs. the training population (capped at ±3σ). Use as a reality-check on the SHAP drivers above — does the model lean on features where the customer actually deviates?

    {{#each feature_deviation}}
  • {{this.feature_name}} {{fmt_float this.feature_value 3}} {{fmt_signed_z this.z}}
  • {{/each}}
{{/if}}
{{#if recommended}}✓{{else}}◎{{/if}} {{#if recommended}}Recommended action{{else}}{{#if is_holdout}}Holdout{{else}}Not recommended{{/if}}{{/if}} {{playbook_name}} {{#if expected_uplift_pct}}Expected uplift · {{fmt_pct expected_uplift_pct}}{{/if}}
{{#if playbook_description}}

{{playbook_description}}

{{/if}} {{#if playbook_when_applicable}}
When this play helps
{{playbook_when_applicable}}
{{/if}} {{#if playbook_time_zero_definition}}
Time-zero definition
{{playbook_time_zero_definition}}
{{/if}} {{#if playbook_analysis_population_rule}}
Analysis population
{{playbook_analysis_population_rule}}
{{/if}} {{#if alternate_playbooks}}
Other applicable playbooks
{{#each alternate_playbooks}} {{this.playbook_name}} {{#if this.fit_score}}{{fmt_pct this.fit_score}} match{{/if}} {{#if this.expected_uplift_pct}}+{{fmt_pct this.expected_uplift_pct}}{{/if}} {{/each}}
{{/if}}
Archetype {{archetype_name}} {{#if policy_fit_score}}{{fmt_pct policy_fit_score}} match{{/if}} {{#if policy_fit_tier}}{{fit_tier_label policy_fit_tier}}{{/if}} {{#if archetype_cluster_size}}{{fmt_int archetype_cluster_size}} customers{{/if}} {{#if archetype_mean_churn_probability}}avg {{fmt_pct archetype_mean_churn_probability}} churn{{/if}}
{{#if archetype_description}}
Description
{{archetype_description}}
{{/if}} {{#if archetype_rationale}}
Why this customer matches
{{archetype_rationale}}
{{/if}} {{#if policy_rationale}}
Policy rationale
{{policy_rationale}}
{{/if}} {{#if eligibility_evidence}}
Evidence on this customer
{{eligibility_evidence}}
{{/if}}
Technical details
{{#if archetype_feature_thresholds}}
Feature thresholds
{{archetype_feature_thresholds}}
{{/if}} {{#if policy_eligibility_rules_prose}}
Eligibility rules · prose
{{policy_eligibility_rules_prose}}
{{/if}} {{#if eligibility_rules_sql}}
Eligibility predicate · SQL
{{eligibility_rules_sql}}
{{/if}}