Configure ServicePoint Dashboard
Author:
Fluent Commerce
Changed on:
13 Dec 2023
Key Points
- Overview
- Configuring the Dashboard
- User Role and Permission
- Understanding Dashboard View
- Customization Example
Author:
Fluent Commerce
Changed on:
13 Dec 2023
`SERVICEPOINT_GQL_DASHBOARD` within the Account at the Retailer context.The component will render the tiles based on the GraphQL Queries and SLA Parameters configured in the setting.
`AWAITING_PICK` status in the last 7 days. Additional statuses and time ranges can be configured to meet Client requirements.1{
2 "key":"SERVICEPOINT_GQL_DASHBOARD",
3 "lob_value":{
4 "gql":{
5 "query":"query dashboardData($locationRef: String!, $pickedFromDate: DateTime!) { ordersAwaitingPick: fulfilments(first: 100, status: \"AWAITING_WAVE\", fromLocation: {ref: $locationRef}, updatedOn: {from: $pickedFromDate}) { pageInfo { hasNextPage } edges { node { id status } } }}",
6 "variables":{
7 "pickedFromDate":"{{dateStringFormatter (dateAdd day=-7) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'}}"
8 }
9 },
10 "dashboard":{
11 "title":"My GQL Dashboard",
12 "sections":[
13 {
14 "title":"Fulfilments",
15 "tilesPerRow":1,
16 "tiles":[
17 {
18 "key":"ordersAwaitingPick",
19 "title":"AWAITING_PICK",
20 "sla":"(7 Days)",
21 "displayTemplate":"{{ordersAwaitingPick.edges.length }}",
22 "thresholdLow":0,
23 "thresholdHigh":1,
24 "link_template":"#/pickandpack"
25 }
26 ]
27 }
28 ]
29 }
30 }
31}`fulfilments`), status (`AWAITING_PICK`), and date fields (`updatedOn: { to: $pickedFromDate }`) for the SLA.`$pickedFromDate` date parameter, in this case using a date range of 7 days. The `dateAdd` directive supports `min`, `hours`, or `days`.`DASHBOARD_VIEW` permission enabled in the `AGENT` context.This permission can be added to any existing role at a specific location or can be assigned to a new role.| Data Limit | Tile Color | Action |
Less than or Equal to the `thresholdLow` value. | Green | None |
More than thresholdLow and less than `thresholdHigh` value. | Amber | Attention required. |
| More than alert thresholdHigh value. | Red | Immediate attention required. |
`query` by adding a new aliased query which filters Fulfilments in a `AWAITING_COLLETION` status1"query": "query dashboardData($locationRef: String!, $pickedFromDate: DateTime!, $collectionFromDate: DateTime!) { ordersAwaitingPick: fulfilments(first: 100, status: \"AWAITING_WAVE\", fromLocation: {ref: $locationRef}, updatedOn: {from: $pickedFromDate}) { pageInfo { hasNextPage } edges { node { id status } } } ordersAwaitingCollection: fulfilments(first: 100, status: \"FULFILLED\", fromLocation: {ref: $locationRef}, updatedOn: {from: $collectionFromDate}) { pageInfo { hasNextPage } edges { node { id updatedOn } } } }",1"variables": {
2 "pickedFromDate": "{{dateStringFormatter (dateAdd min=-5) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'}}",
3 "collectionFromDate": "{{dateStringFormatter (dateAdd days=-30) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'}}"
4}`AWAITING_COLLECTION` status.1{
2 "key": "orderAwaitingCollection",
3 "title": "AWAITING_COLLECTION",
4 "sla": "",
5 "displayTemplate": "{{ ordersAwaitingCollection.edges.length }}",
6 "thresholdLow": 0,
7 "thresholdHigh": 10,
8 "link_template": "#/collections"
9}1{
2 "key": "SERVICEPOINT_GQL_DASHBOARD",
3 "lob_value": {
4 "gql": {
5 "query": "query dashboardData($locationRef: String!, $pickedFromDate: DateTime!, $collectionFromDate: DateTime!) { ordersAwaitingPick: fulfilments(first: 100, status: \"AWAITING_WAVE\", fromLocation: {ref: $locationRef}, updatedOn: {from: $pickedFromDate}) { pageInfo { hasNextPage } edges { node { id status } } } ordersAwaitingCollection: fulfilments(first: 100, status: \"FULFILLED\", fromLocation: {ref: $locationRef}, updatedOn: {from: $collectionFromDate}) { pageInfo { hasNextPage } edges { node { id updatedOn } } } }",
6 "variables": {
7 "pickedFromDate": "{{dateStringFormatter (dateAdd min=-5) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'}}",
8 "collectionFromDate": "{{dateStringFormatter (dateAdd days=-30) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'}}"
9 }
10 },
11 "dashboard": {
12 "title": "My GQL Dashboard",
13 "sections": [
14 {
15 "title": "Fulfilments",
16 "tilesPerRow": 1,
17 "tiles": [
18 {
19 "key": "ordersAwaitingPick",
20 "title": "AWAITING_PICK",
21 "sla": "> 5 Minutes",
22 "displayTemplate": "{{ordersAwaitingPick.edges.length }}",
23 "thresholdLow": 0,
24 "thresholdHigh": 1,
25 "link_template": "#/pickandpack"
26 },
27 {
28 "key": "orderAwaitingCollection",
29 "title": "AWAITING_COLLECTION",
30 "sla": "> 30 Days",
31 "displayTemplate": "{{ ordersAwaitingCollection.edges.length }}",
32 "thresholdLow": 0,
33 "thresholdHigh": 10,
34 "link_template": "#/collections"
35 }
36 ]
37 }
38 ]
39 }
40 }
41}