Freshdesk app for TechCorp Solutions that surfaces B2B customer health scores in the ticket sidebar and full-page app using Platform 3.0 instance methods.
TechCorp CSMs need account health tiers visible while working tickets. This app demonstrates parent/child instance coordination — modal health reviews, dialog escalation notes, and cross-instance messaging. See usecase.md for the full TechCorp operational scenarios.
- Health tier badge — Healthy / At Risk / Critical in the ticket sidebar
- Modal workflow — update assessment and notify the parent via
instance.send - Dialog escalation — quick notes through
showDialog - Instance coordination —
instance.resize,context, andreceivefor multi-instance messaging
- Health tier badge (Healthy / At Risk / Critical) in the ticket sidebar
- Modal workflow to update assessment and notify the parent instance via
instance.send - Dialog for quick escalation notes
instance.resize,context, andreceivefor multi-instance coordination
| Surface | Placement | Behavior |
|---|---|---|
app/index.html |
support_ticket.ticket_sidebar |
Health badge, open modal/dialog |
app/index.html |
service_ticket.ticket_sidebar |
Same health UI on Freshservice |
app/index.html |
common.full_page_app |
Portfolio health dashboard |
app/index.html |
sales_account.sales_account_entity_menu |
Account-level health view |
app/index.html |
chat_conversation.conversation_user_info |
Health context in chat |
app/modal.html |
Modal / dialog child instance | Health form; sends tier to parent |
client.instance.resize({ height: '400px' });
client.instance.receive(function (event) { /* healthTier update */ });
childClient.instance.send({ message: { healthTier, notes } });
childClient.instance.close();client.interface.trigger('showModal', { template: 'modal.html', data: {...} }) opens the health review form. showDialog demonstrates a lighter escalation surface.
One codebase deploys across support_ticket, service_ticket, sales_account, chat_conversation, and common.full_page_app.
The app uses Freshworks Crayons v4 design system:
| Component | Usage |
|---|---|
<fw-label> |
Health tier badge (color-coded) |
<fw-button> |
Open health review, escalation note, form actions |
<fw-form> / <fw-select> |
Modal health assessment form |
<fw-textarea> |
CSM notes in modal |
| Layer | Role |
|---|---|
app/index.html |
Parent UI — badge + actions |
app/modal.html |
Child instance — health form |
app/scripts/app.js |
Instance API orchestration |
Placements: full_page_app, ticket_sidebar (support + service), sales_account_entity_menu, conversation_user_info.
instance-method-samples/
├── app/
│ ├── index.html # Parent — badge + modal/dialog triggers
│ ├── modal.html # Child — health form + instance.send
│ ├── scripts/app.js
│ └── styles/
├── config/
│ └── iparams.json # Empty — no install params required
├── manifest.json
├── usecase.md
└── README.md
- Freshworks CLI (FDK) v10.1.2 or later
- Node.js v24.x
- A Freshdesk trial account (Freshservice / Freshsales / chat surfaces optional)
Enable global apps before local development:
fdk config set global_apps.enabled true- Install the app on your Freshdesk account.
- No installation parameters required (
config/iparams.jsonis empty). - Run locally:
fdk validate fdk run
- Open a ticket with
?dev=trueand use Open health review to test modal messaging.
- Parent load — On
app.activated, callinstance.resizeand subscribe toinstance.receive. - Show modal —
client.interface.trigger('showModal', { template: 'modal.html', data: {...} }). - Child submit — Child calls
instance.send({ message: { healthTier, notes } })theninstance.close(). - Parent update —
receivehandler readshealthTierand updates the Crayons label.
- Platform 3.0
- Node 24.11.1 · FDK 10.1.2
fdk validateReset local state when re-testing instance messaging:
rm .fdk/store.sqlite
fdk run- Child closes itself — call
instance.close()afterinstance.sendso the parent regains focus. - Subscribe on activate — register
instance.receiveinsideinstance.context()so the handler knows its instance ID. - Modal vs dialog —
showModalfor full forms;showDialogfor lightweight prompts sharing the same template. - Resize both instances — parent sidebar and child modal may need separate
instance.resizecalls.
See usecase.md for industry scenarios.
