A Freshworks Platform 3.0 sample app that explores client.data.get() across Freshdesk, Freshservice, CRM, and common placeholders — reading page context without REST calls.
Agents and developers often need ticket, contact, and account context in the sidebar instantly. HealthFirst Data Playground maps one tabbed UI to every supported placeholder so you can click a data key, inspect JSON, and learn what works where — instead of guessing from documentation alone.
- Tabbed key browser — Account, Ticket, Field options, Portal, Freshservice, and CRM tabs.
- Live JSON inspection — each button calls
client.data.get(key)and pretty-prints the response. - Multi-surface deployment — same playground HTML on ticket, contact, change, asset, CTI, full-page, and deal menu placeholders.
- Expected errors — keys unavailable on the current page surface an error in the result panel (by design when exploring).
| Surface | Module / placement | Typical keys |
|---|---|---|
app/views/playground.html |
support_ticket.ticket_sidebar |
ticket, requester, priority_options, … |
app/views/playground.html |
service_ticket.ticket_sidebar |
ticket, currentHost, … |
app/views/playground.html |
support_contact.contact_sidebar |
contact, company, … |
app/views/playground.html |
service_change.change_sidebar |
change, currentHost |
app/views/playground.html |
service_asset.asset_sidebar |
asset, currentHost |
app/views/playground.html |
service_user.contact_sidebar |
department, currentHost |
app/views/playground.html |
common.full_page_app, cti_global_sidebar |
loggedInUser, domainName, currentHost |
app/views/playground.html |
deal.deal_entity_menu |
currentEntityInfo |
const { ticket } = await client.data.get('ticket');
const { loggedInUser } = await client.data.get('loggedInUser');
const options = await client.data.get('priority_options');Data is already loaded on the page — no separate API round trip.
Each data key is only available on certain placeholders. The playground surfaces errors when a key is requested from the wrong page, teaching developers which keys work where.
One manifest declares support_ticket, service_ticket, support_contact, service_change, service_asset, service_user, deal, and common modules so a single package installs across SKUs.
| Component | Usage |
|---|---|
<fw-button> |
Data key trigger buttons per tab |
<fw-tabs> |
Account / Ticket / Field options / Portal / Freshservice / CRM |
<fw-label> |
JSON result panel headings |
Shared logic lives in app/scripts/lib/data-playground.js; entry script: app/scripts/playground.js.
├── app/
│ ├── views/playground.html
│ ├── scripts/
│ │ ├── playground.js
│ │ └── lib/data-playground.js
│ └── styles/
│ ├── common.css
│ ├── playground.css
│ └── images/icon.svg
├── config/
│ └── iparams.json
├── manifest.json
├── usecase.md
└── README.md
- Freshworks CLI (FDK) v10.1.2 or later
- Node.js v24.x
- Trial accounts for the Freshworks products you want to explore
Enable global apps before local development:
fdk config set global_apps.enabled true-
Clone the repository:
git clone <repo-url> cd data-method-samples
-
Validate and run:
fdk validate fdk run
-
Open the relevant product page with
?dev=true, install the app, and open HealthFirst Data Playground from the sidebar, Apps menu, or CTI bar.
FDK allows either an app/ folder (agent surfaces) or a visitor-app/ folder (end-user portal), not both in one package. This sample uses app/ and declares support_portal: {} for multi-SKU installs. To run on a live portal page, adapt the playground into a visitor-app/ layout.
- No REST for page context — prefer
client.data.get()for data already on the active page. <field>_optionspattern — dropdown values expose aspriority_options,status_options, etc. on ticket pages.- Placeholder matters — register the app on the surface where the data key is documented; wrong placement returns errors.
