A Freshdesk ticket sidebar app that pulls Shopify customers and orders into the agent view. Built with React Meta, Crayons React, and Platform request templates.
| Platform | 3.0 |
| Framework | React Meta |
| Surface | ticket_sidebar |
| Node | 24.11.1 |
| FDK | 10.1.2 |
Agents on a ticket can:
- Look up orders by customer email (Shopify Orders API)
- Browse customers as accordion cards (Shopify Customers API)
- Clear results or reset the form between lookups
Shopify calls use request templates (fetchCustomers, fetchCustomerOrders in config/requests.json). Credentials are stored in installation parameters — the access token is secure.
| Requirement | Link / notes |
|---|---|
| Node.js 24.x | Node downloads |
| FDK 10.1.2 | Freshworks FDK setup |
| Freshdesk dev account | Your Freshdesk site URL (e.g. https://acme.freshdesk.com) |
| Shopify store | Shopify Admin with permission to create custom apps |
| Admin API token | Scopes: read_customers, read_orders — see Step 1 |
Create a custom app in your store (not an embedded Partner app). The Freshdesk sidebar only needs an Admin API token — no App URL or OAuth redirect.
- Open Shopify Admin → Settings → Apps and sales channels → Develop apps.
- Click Create an app (e.g.
Freshdesk integration). - Under Configuration → Admin API integration, set Admin API access scopes:
read_customers,read_orders- Scope reference: Shopify access scopes
- Click Save, then Install app on your store.
- Open API credentials and copy:
- Admin API access token (starts with
shpat_…) — use this in Freshdesk, not the Storefront token - Your store subdomain from
your-store.myshopify.com→ subdomain isyour-store
- Admin API access token (starts with
| Freshdesk iparam | Where to get it |
|---|---|
| Shopify sub domain | your-store from your-store.myshopify.com |
| Shopify Access Token | Custom app → API credentials → Admin API access token |
From this folder:
cd only-migration/shopify-integration
npm install
fdk config set global_apps.enabled true
fdk validateglobal_apps.enabled is required because request templates are declared under modules.common — see global app concepts.
Expected: 0 platform errors, 0 lint errors.
fdk runKeep this terminal running. The FDK serves the app and opens local developer tools.
| Local URL | Purpose |
|---|---|
| http://localhost:10001/custom_configs | Enter iparams (subdomain + token) |
| http://localhost:10001/system_settings | Account URLs and module subscription |
| http://localhost:10001/web/test | Webhook / event testing (not used by this app) |
Docs: Test your app
- With
fdk runactive, open http://localhost:10001/custom_configs. - Enter:
- Shopify sub domain — e.g.
your-store - Shopify Access Token — Admin API token from Step 1
- Shopify sub domain — e.g.
- Click Save.
These map to config/iparams.json and are substituted into config/requests.json at runtime.
- Open your Freshdesk site with dev mode:
https://<your-domain>.freshdesk.com/a/?dev=true- If the URL already has query params, use
&dev=trueinstead of?dev=true
- When the browser prompts, allow local network access (required for
fdk run). - Open any ticket.
- In the right Apps panel, launch Shopify Integration.
- Try:
- Enter a customer email → Fetch Orders
- Fetch Customers to list store customers
- Reset All to clear the sidebar
| View | |
|---|---|
| Ticket sidebar | ![]() |
| Fetch Customers | ![]() |
| Fetch Orders | ![]() |
| Button | Action |
|---|---|
| Fetch Orders | Loads orders for the email in the input field |
| Clear Orders | Clears email and order list |
| Fetch Customers | Loads customer accordion cards from Shopify |
| Clear Customers | Removes customer cards |
| Reset All | Clears customers, orders, and status messages |
shopify-integration/
├── manifest.json # React Meta + request template declarations
├── package.json
├── app/
│ ├── sidebar.html # ticket_sidebar entry
│ ├── components/ # ShopifyMain, ShopifyApp, CustomerCard, OrderCard
│ ├── utils/ # shopify-api.js, validation.js
│ └── styles/
├── config/
│ ├── iparams.json
│ └── requests.json # Shopify Admin API 2023-04
├── tests/
│ └── shopify-api.test.js
└── docs/
├── usecase.md
├── solution.md
├── app_dev_guide.md
└── assets/shopify-api-collection.json
npm test
fdk validate| Symptom | What to check |
|---|---|
| 401 / request fails | Correct subdomain and Admin API token; custom app installed on the store |
| No customers | Store has customers; scopes include read_customers |
| No orders for email | Email has orders in Shopify; scopes include read_orders |
| global apps validation error | Run fdk config set global_apps.enabled true |
| App does not appear | fdk run is running; URL has ?dev=true; local network allowed |
| Invalid scopes in Partner dashboard | This app uses store custom apps, not embedded Partner OAuth — see Step 1 |



