Fluent Commerce Logo
Docs
Sign In

Change Address Workflow Template Overview

How-to Guide

Author:

Fluent Commerce

Changed on:

3 Dec 2023

Key Points

  • User action capability is used to update the Delivery Info of an Order.

Steps

Step arrow right iconStep 1: Extend Home Delivery Order workflow to add a rule to change address

Home Delivery (HD) Order workflow should be extended to have a rule to change address. Add the following JSON fragment to the HD Order ruleset:

1{
2    "name": "OrderAddressChange",
3    "description": "Order address is changed from admin console",
4    "type": "ORDER",
5    "subtype": "HD",
6    "eventType": "NORMAL",
7    "rules": [
8        {
9            "name": "FLUENTRETAIL.base.ChangeOrderDeliveryAddress",
10            "props": null
11        }
12    ],
13    "triggers": [
14        {
15            "status": "PENDING_PAYMENT"
16        },
17        {
18            "status": "BOOKED"
19        },
20        {
21            "status": "CREATED"
22        },
23        {
24            "status": "PICK_PACK"
25        }
26    ],
27    "userActions": [
28        {
29            "context": [
30                {
31                    "label": "CHANGE ADDRESS",
32                    "type": "SECONDARY",
33                    "modules": [
34                        "adminconsole"
35                    ],
36                    "confirm": true
37                }
38            ],
39            "attributes": [
40                {
41                    "name": "deliveryAddress",
42                    "label": "Address",
43                    "type": "ADDRESS",
44                    "source": "",
45                    "defaultValue": "",
46                    "mandatory": false
47                },
48                {
49                    "name": "changeReason",
50                    "label": "Change Reason",
51                    "type": "STRING",
52                    "source": "",
53                    "defaultValue": "",
54                    "mandatory": false
55                }
56            ]
57        }
58    ]
59},

Language: json

Name: JSON fragment

Description:

[Warning: empty required content area]

Step arrow right iconStep 2: Extend fc.mystique.manifest.oms.fragment.ordermanagement setting

`fc.mystique.manifest.oms.fragment.ordermanagement`
 setting should be extended with the following JSON fragment: Refer to Setting Edit Mutation to learn how to edit a setting.

Add the following JSON fragment to the setting

1{
2    "type": "userAction",
3    "name": "OrderAddressChange",
4    "label": "Change Address",
5    "overrides": {
6        "deliveryAddress": {
7        "defaultValue": {
8            "companyName": "{{orderById.fulfilmentChoice.deliveryAddress.companyName}}",
9            "name": "{{orderById.fulfilmentChoice.deliveryAddress.name}}",
10            "street": "{{orderById.fulfilmentChoice.deliveryAddress.street}}",
11            "city": "{{orderById.fulfilmentChoice.deliveryAddress.city}}",
12            "postcode": "{{orderById.fulfilmentChoice.deliveryAddress.postcode}}",
13            "state": "{{orderById.fulfilmentChoice.deliveryAddress.state}}",
14            "country": "{{orderById.fulfilmentChoice.deliveryAddress.country}}"
15            }
16        }
17    }
18}

Language: json

Name: JSON fragment

Description:

[Warning: empty required content area]
No alt providedNo alt providedNo alt provided

All marked fields in Home Delivery (HD) Order workflow should be equal corresponding fields in 

`fc.mystique.manifest.oms.fragment.ordermanagement`
 setting.

Fluent Commerce

Fluent Commerce

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.

Fluent Logo