Author:
Fluent Commerce staff
Changed on:
24 Jan 2024
As a Customer Service user, when the fulfilment is in escalated status, I want to execute certain backend functionalities (e.g. trigger a webhook to ERP for refund.) and mark the fulfilment status in a detailed level.
If the status is Escalated due to OOS for all items in the order - I need a user action button to trigger the process.
Suppose the status is Escalated due to OOS for a few items in the order. In that case, I need a user action button to acknowledge the fulfilment is PARTIAL fulfilled and trigger the partial delivery process in ERP.
Introduce a new attribute in fulfilment level to keep track of "few items" OOS. The value of this attribute should be part of the order workflow.
In the fulfilment Detail Page, display the following user action button:
`CUSTOMER SERVICE CANCEL`
`ACCEPT SHORT DELIVERY`
To support the business solution design, the following technical areas need to be enhanced:
`PARTIAL_DELIVERY`
`CUSTOMERSERVICE_CANCEL`
`ACCEPT_SHORT_DELIVERY`
`fc.mystique.manifest.oms.fragment.ordermanagement`
1{
2 "name": "CUSTOMERSERVICE_CANCEL",
3 "description": "Test CUSTOMERSERVICE_CANCEL Cancel",
4 "type": "FULFILMENT",
5 "subtype": "HD_PFS",
6 "eventType": "NORMAL",
7 "rules": [
8 {
9 "name": "<Accountid>.base.ChangeStateGQL",
10 "props": {
11 "status": "CS_CANCELLED"
12 },
13 ... //Add call webhook rule in here.
14 }
15 ],
16 "triggers": [
17 {
18 "status": "ESCALATED"
19 }
20 ],
21 "userActions": [
22 {
23 "context": [
24 {
25 "label": "CUSTOMER SERVICE CANCEL",
26 "type": "PRIMARY",
27 "modules": [
28 "adminconsole"
29 ],
30 "confirm": true
31 }
32 ],
33 "attributes": []
34 }
35 ]
36 },
37 {
38 "name": "ACCEPT_SHORT_DELIVERY",
39 "description": "Test ACCEPT_SHORT_DELIVERY Cancel",
40 "type": "FULFILMENT",
41 "subtype": "HD_PFS",
42 "eventType": "NORMAL",
43 "rules": [
44 {
45 "name": "FLUENTRETAIL.base.ChangeStateGQL",
46 "props": {
47 "status": "ACCEPT_SHORT_DELIVERY"
48 },
49 ... //Add call webhook rule in here.
50 }
51 ],
52 "triggers": [
53 {
54 "status": "ESCALATED"
55 }
56 ],
57 "userActions": [
58 {
59 "context": [
60 {
61 "label": "ACCEPT SHORT DELIVERY",
62 "type": "PRIMARY",
63 "modules": [
64 "adminconsole"
65 ],
66 "confirm": true
67 }
68 ],
69 "attributes": []
70 }
71 ]
72 },
Language: json
Name: CUSTOMERSERVICE_CANCEL and ACCEPT_SHORT_DELIVERY rulesets in Order workflow
Description:
Both rulesets have their own user action with filter status = escalated.
Add the following code snippets to
` fc.mystique.manifest.oms.fragment.ordermanagement`
1"props": {
2 "title": "Fulfilment - {{fulfilmentById.id}} - {{fulfilmentById.status}}",
3 "actions": {
4 "primary": [
5 {
6 "type": "userAction",
7 "name": "ACCEPT_SHORT_DELIVERY",
8 "condition": "{{and fulfilmentById.attributes.byName.PARTIAL_DELIVERY}}"
9 }
10 ]
11 },
Language: json
Name: Code Snippets to control user Action Button visibility by checking an attribute value
Description:
The button will not be visible if the attribute value is not true.
To test the change, let's add the attribute to the fulfilment:
1// QUERY:
2mutation updateFulfilment ($input: UpdateFulfilmentInput) {
3 updateFulfilment (input: $input) {
4 id
5 ref
6 }
7}
8
9// Variables:
10{
11 "input": {
12 "id": <fulfilmentId>,
13 "attributes":[
14 {
15 "name":"PARTIAL_DELIVERY",
16 "type":"BOOLEAN",
17 "value": "TRUE"
18
19 }
20 ]
21 }
22}
Language: graphqlschema
Name: updateFulfilment with Attributes
Description:
[Warning: empty required content area]In the Fulfilment detail page, the escalated fulfilment without PARTIAL_DELIVERY attribute will only display
`CUSTOMER SERVICE CANCEL`
The escalated fulfilment with PARTIAL_DELIVERY attribute will display
`CUSTOMER SERVICE CANCEL`
`ACCEPT SHORT DELIVERY`
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.