{ "cells": [ { "cell_type": "markdown", "id": "1a76b7ed", "metadata": {}, "source": [ "# 02 — Costs Analysis\n", "\n", "**Study:** Forrester TEI™ Of Amazon Connect (Feb 2026)\n", "\n", "Three cost categories, three-year horizon, 10% discount rate.\n", "Target risk-adjusted PV = **$22,983,076**." ] }, { "cell_type": "code", "execution_count": null, "id": "46446223", "metadata": {}, "outputs": [], "source": [ "import sys\n", "from pathlib import Path\n", "\n", "ROOT = Path.cwd().resolve()\n", "while ROOT != ROOT.parent and not (ROOT / 'core').is_dir():\n", " ROOT = ROOT.parent\n", "if str(ROOT) not in sys.path:\n", " sys.path.insert(0, str(ROOT))\n", "STUDY = ROOT / 'studies' / '202602_AmazonConnect'\n", "if str(STUDY) not in sys.path:\n", " sys.path.insert(0, str(STUDY))" ] }, { "cell_type": "code", "execution_count": null, "id": "4ec64198", "metadata": {}, "outputs": [], "source": [ "import config\n", "import seed_data\n", "from core.calculations import npv, risk_adjust_cost\n", "from core.notebook_helpers import charts, display, tables" ] }, { "cell_type": "markdown", "id": "26f1d385", "metadata": {}, "source": [ "## Costs — nominal & risk-adjusted\n", "\n", "| Ref | Cost | Initial | Y1 | Y2 | Y3 | Risk Adj |\n", "|---|---|---|---|---|---|---|\n", "| Ft | Amazon Connect usage | — | $6.5M | $8.0M | $9.8M | ↑5% |\n", "| Gt | Implementation & migration | $1.09M | $188K | $188K | — | ↑10% |\n", "| Ht | Ongoing management | — | $256K | $187K | $187K | ↑15% |\n", "\n", "Note **costs are risk-adjusted *upward*** (higher risk → higher modelled cost)." ] }, { "cell_type": "code", "execution_count": null, "id": "9635f334", "metadata": {}, "outputs": [], "source": [ "df = tables.costs_table(seed_data.COSTS)\n", "df.style.format({c: '${:,.0f}' for c in df.columns if c not in ('field_key','label','category','risk_adjustment')})" ] }, { "cell_type": "markdown", "id": "0667d1da", "metadata": {}, "source": [ "## Local validation\n", "\n", "Reproduce the **$22,983,076** Costs PV from the PDF Cash Flow Analysis." ] }, { "cell_type": "code", "execution_count": null, "id": "3e35a794", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "rows = []\n", "for c in seed_data.COSTS:\n", " rf = c['risk_adjustment']\n", " init_ra = risk_adjust_cost(c.get('initial') or 0, rf)\n", " yr = [c['year_values'][str(y)] for y in (1, 2, 3)]\n", " yr_ra = [risk_adjust_cost(v, rf) for v in yr]\n", " pv = npv(yr_ra, config.DISCOUNT_RATE, initial=init_ra)\n", " rows.append({\n", " 'Cost': c['label'],\n", " 'Initial (RA)': init_ra,\n", " 'Y1 (RA)': yr_ra[0],\n", " 'Y2 (RA)': yr_ra[1],\n", " 'Y3 (RA)': yr_ra[2],\n", " 'PV': pv,\n", " })\n", "df_check = pd.DataFrame(rows)\n", "totals = df_check.drop(columns='Cost').sum()\n", "df_check.loc[len(df_check)] = ['TOTAL'] + totals.tolist()\n", "df_check.style.format({c: '${:,.0f}' for c in df_check.columns if c != 'Cost'})" ] }, { "cell_type": "code", "execution_count": null, "id": "4109784e", "metadata": {}, "outputs": [], "source": [ "expected_pv = 22_983_076\n", "computed_pv = df_check.iloc[-1]['PV']\n", "delta = computed_pv - expected_pv\n", "kind = 'success' if abs(delta) < 1_000 else 'warning'\n", "display.alert(\n", " f'Computed Costs PV: ${computed_pv:,.0f}
'\n", " f'Forrester target: ${expected_pv:,.0f}
'\n", " f'Δ = ${delta:,.0f}',\n", " kind,\n", ")" ] }, { "cell_type": "markdown", "id": "dd1b3c04", "metadata": {}, "source": [ "## Cost mix\n", "\n", "Most of the three-year cost (~90%) is Amazon Connect *usage* (Ft) —\n", "consistent with the PDF's framing that consumption-based pricing dominates,\n", "with implementation a one-time investment." ] }, { "cell_type": "code", "execution_count": null, "id": "90e9b5e2", "metadata": {}, "outputs": [], "source": [ "charts.cost_breakdown_pie(seed_data.COSTS).show()" ] }, { "cell_type": "markdown", "id": "3d15ae10", "metadata": {}, "source": [ "## Push to Athena" ] }, { "cell_type": "code", "execution_count": null, "id": "03547040", "metadata": {}, "outputs": [], "source": [ "if config.TOOL_PUBLIC_ID:\n", " from core.tei_client import TEIClient\n", "\n", " client = TEIClient()\n", " client.update_values(config.TOOL_PUBLIC_ID, seed_data.COSTS)\n", " display.alert(f'Pushed {len(seed_data.COSTS)} cost rows to '\n", " f'tool {config.TOOL_PUBLIC_ID}.', 'success')\n", "else:\n", " display.alert('No TOOL_PUBLIC_ID set — skipped Athena push.', 'info')" ] }, { "cell_type": "markdown", "id": "6f5befbb", "metadata": {}, "source": [ "Continue with [`03_business_case.ipynb`](03_business_case.ipynb) →" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.7" } }, "nbformat": 4, "nbformat_minor": 5 }