Multi-instance communication demo for Freshdesk and Freshservice on Platform 3.0. RelayDesk shows how one app runs in multiple ticket placeholders on the same page and exchanges data via client.instance APIs.
| Surface | Placeholder | What it demonstrates |
|---|---|---|
| Instance Hub | ticket_sidebar |
instance.get(), targeted send with receiver, resize, showModal + modalData launcher |
| Requester Info | ticket_requester_info |
Cross-location receive, reply to sidebar via get + send |
| Modal | Opened from sidebar | Reads modalData from instance.context(), returns data via send |
Both support_ticket (Freshdesk) and service_ticket (Freshservice) register the same views.
The sidebar and requester-info panels poll client.instance.get() to list every active app instance in this browser tab — instance id, location, and which row is “self”.
- Sidebar: pick a receiver from the dropdown or use Ping requester info to target
ticket_requester_infodirectly. - Requester info: Send to sidebar resolves
ticket_sidebarviaget()and sends with an explicitreceiverarray.
The sidebar opens a modal with a data object (name, email). The modal reads (await client.instance.context()).modalData and pre-fills the form. Submit sends the payload back to the parent via instance.send() (no receiver — routes to parent).
Each surface calls client.instance.resize() — sidebar up to 700px, requester info 420px, modal 480px.
git clone https://github.com/freshworks-developers/instance-method-samples.git
cd instance-method-samples
fdk runAppend ?dev=true to your Freshdesk or Freshservice URL.
- Open any ticket details page.
- Expand ticket sidebar apps — open RelayDesk Instance Hub.
- In the requester info strip (contact section), open RelayDesk Requester Info.
- Watch both surfaces list each other under Active instances.
- Send messages between them or open the modal from the sidebar.
instance.get()only sees instances active in the same browser tab. Both placeholders must be open on the same ticket page.
fdk validate
fdk pack.
├── manifest.json
├── app/
│ ├── views/
│ │ ├── ticket-sidebar.html
│ │ ├── ticket-requester-info.html
│ │ └── modal.html
│ ├── scripts/
│ │ ├── lib/instance-hub.js
│ │ ├── ticket-sidebar.js
│ │ ├── ticket-requester-info.js
│ │ └── modal.js
│ └── styles/
│ ├── common.css
│ ├── ticket-sidebar.css
│ ├── ticket-requester-info.css
│ ├── modal.css
│ └── images/icon.svg
├── README.md
└── USECASE.md
- Platform: Freshworks Platform 3.0
- Runtime: Node.js 24.11.0 · FDK 10.1.2
- UI: Crayons v4