Changed on:
7 May 2025
Setting Area | UI component, Orders, Workflow |
---|---|
Supported context levels: | ACCOUNT RETAILER AGENT |
The `fc.mystique.fields.basicpack`
setting enables the configuration of the Multi-Parcel Component fields.
Data Type | Values |
---|---|
JSON | See Technical Description |
This setting can be used at various different context levels to achieve different results. The setting will look for the lowest level context first and then move upwards until it finds one containing a `fc.mystique.fields.basicpack`
setting.
For example, you can have one setting at the `ACCOUNT`
level, and two settings for `LOCATION 3`
and `LOCATION 5`
. This will cause `LOCATION 3`
and `LOCATION 5`
to use specific parcel type settings, whereas all other will use the more general `ACCOUNT`
level setting.
If no setting can be found, then the system will look for legacy attributes on an `AGENT`
context to populate the field. If neither of these can be found, then the field will render with the dropdown containing the `custom`
parcel type.
Name | Required | Type | Default | Description |
query | No | String | See Query Property below | An optional override for the default query used to populate the basicpack component. The default query is provided below. The basicpack field requires certain data to be retrieved to function correctly, so if you need to retrieve more data than the default provides it is recommended to use the default query as a base and add additional fields to that, rather than generate a new query from scratch. |
attributes | No | Array | See schema | Optional overrides for the data shown in each column of the multi-parcel component. Configuration details and default values are captured in the Attributes Configuration section. By default without overrides the following fields are shown in the table: Reference, Customer Name, Type and Fulfilment Status. |
allowMultipleParcelsPerItem | No | Boolean | true | Determines whether to enable validation that limits the number of parcels that can be added to the fulfilment. When this setting is |
parcelTypes | Yes | Parcel Types | N/A | The definition of what parcel types there are. See Parcel Types Property for the keywords available for this object. |
The following is the default query that is used to populate them basicpack component. If the `query`
prop is populated then that value will be passed instead of this default query. Otherwise, if left empty then the default will be used.
1query ($waveId: ID!) {
2 waveById(id: $waveId) {
3 id
4 ref
5 status
6 location {
7 id
8 ref
9 attributes {
10 name
11 type
12 value
13 }
14 }
15 fulfilments(first: 100) {
16 edges {
17 node {
18 id
19 ref
20 status
21 toAddress {
22 id
23 ref
24 }
25 items(first: 100) {
26 edges {
27 node {
28 ref
29 filledQuantity
30 rejectedQuantity
31 requestedQuantity
32 }
33 }
34 }
35 order {
36 id
37 ref
38 type
39 status
40 fulfilmentChoice {
41 deliveryType
42 }
43 customer {
44 firstName
45 lastName
46 primaryEmail
47 primaryPhone
48 }
49 }
50 }
51 }
52 }
53 }
54}
When not explicitly specified, the following configuration is displayed by default:
Name | Required | Type | Default | Description |
value | Yes | String | NA | The value for a corresponding cell in a given column. For example if you were to display the reference number you would use |
label | Yes | String | NA | The column label. This is a template string For example if you were to display the label " Reference" you would use |
hideBelow | No |
| Undefined | Optional to hide columns and values below certain breakpoints. If not specified, the column will not be hidden. |
1 {
2 "attributes": [
3 {
4 "value": "{{order.ref}}",
5 "label": ["fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.order.ref.heading", "Order reference"],
6 "hideBelow": "sm"
7 },
8 {
9 "value": "{{order.customer.firstName}} {{order.customer.lastName}}",
10 "label": ["fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.customer.name.heading", "Customer name"]
11 },
12 {
13 "value": "{{orderType}}",
14 "label": ["fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.order.type.heading", "Order type"]
15 },
16 {
17 "value": "{{status}}",
18 "label": ["fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.fulfilment.status.heading", "Fulfilment status"]
19 }
20 ]
Name | Required | Type | Default | Description |
defaultParcel | No | String | None | The default parcel type. This value will be preselected on the parcel type dropdown when the page first loads. This creates a more efficient packing , however may increase user error. If no value is defined, then the initial state of the dropdown will be blank. This forces the user to explicitly choose a parcel each time. The string must match the name of the parcel types under parcels. Otherwise, the default will remain blank. |
parcels | Yes | Array of parcels | N/A | A list of parcels. Each entry in the array represents one option in the dropdown. Configuration details are captured in the Parcels data dictionary section. |
Add the details about each individual parcel in the parcels object below
Name | Required | Type | Description |
name | Yes | String | The name of the parcel. This is what will be displayed on the dropdown to the . |
length(cm) | Yes | Number | The length of the parcel in centimetres |
width(cm) | Yes | Number | The width of the parcel in centimetres |
height(cm) | Yes | Number | The height of the parcel in centimetres |
barcode | No | String | This property will eventually be used for barcode scanning capabilities in the future. |
defaultWeight | No | Number | The default value of the weight. The weight field will be preselected with this value when this parcel is selected. |
minWeight | No | Number | The minimum weight of this parcel. If defined, the user has to input a weight value higher than this number. |
maxWeight | No | Number | The maximum weight of this parcel. If defined, the user has to input a weight value lower than this number. |
Here is the JSON Schema that describes the structure for this setting. This can be used with the Setting Form Component to create a form for editing this setting.
(Note: hideBelow should be an enum, but there is a known issue where an empty value can't be selected or specified as the default value for an enum.)
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "title": "Pack Screen Configuration",
4 "type": "object",
5 "properties": {
6 "allowMultipleParcelsPerItem": {
7 "title": "Allow Multiple Parcels Per Item",
8 "type": "boolean"
9 },
10 "parcelTypes": {
11 "title": "Parcel Configuration",
12 "type": "object",
13 "properties": {
14 "defaultParcel": {
15 "title": "Default Parcel Type",
16 "type": "string"
17 },
18 "parcels": {
19 "title": "Parcel Types",
20 "type": "array",
21 "items": {
22 "type": "object",
23 "properties": {
24 "name": {
25 "title": "Name",
26 "type": "string"
27 },
28 "length": {
29 "title": "Length (cm)",
30 "type": "string"
31 },
32 "width": {
33 "title": "Width (cm)",
34 "type": "string"
35 },
36 "height": {
37 "title": "Height (cm)",
38 "type": "string"
39 },
40 "barcode": {
41 "title": "Barcode",
42 "type": "string"
43 },
44 "defaultWeight": {
45 "title": "Default Weight",
46 "type": "string"
47 },
48 "minWeight": {
49 "title": "Minimum Weight",
50 "type": "string"
51 },
52 "maxWeight": {
53 "title": "Maximum Weight",
54 "type": "string"
55 }
56 },
57 "required": [
58 "name",
59 "length",
60 "width",
61 "height"
62 ]
63 }
64 }
65 },
66 "required": [
67 "parcels"
68 ]
69 },
70 "query": {
71 "title": "GraphQL Query",
72 "type": "string",
73 "default": "query ($waveId: ID!) { waveById(id: $waveId) { id ref status location { id ref attributes { name type value } } fulfilments(first: 100) { edges { node { id ref status toAddress { id ref } items(first: 100) { edges { node { ref filledQuantity rejectedQuantity requestedQuantity } } } order { id ref type status fulfilmentChoice { deliveryType } customer { firstName lastName primaryEmail primaryPhone } } } } } } }"
74 },
75 "attributes": {
76 "title": "Table Columns",
77 "type": "array",
78 "default": [
79 {
80 "value": "{{order.ref}}",
81 "label": "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.order.ref.heading"
82 },
83 {
84 "value": "{{order.customer.firstName}} {{order.customer.lastName}}",
85 "label": "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.customer.name.heading"
86 },
87 {
88 "value": "{{orderType}}",
89 "label": "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.order.type.heading"
90 },
91 {
92 "value": "{{status}}",
93 "label": "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.fulfilment.status.heading"
94 }
95 ],
96 "items": {
97 "title": "Column Items",
98 "type": "object",
99 "properties": {
100 "value": {
101 "title": "Value",
102 "type": "string"
103 },
104 "label": {
105 "title": "Label",
106 "type": "string"
107 },
108 "hideBelow": {
109 "title": "Hide Below",
110 "type": "string",
111 "default": ""
112 }
113 },
114 "required": [
115 "value",
116 "label"
117 ]
118 }
119 }
120 },
121 "required": [
122 "parcelTypes"
123 ]
124}
1{
2 "query": "query ($waveId: ID!) { waveById(id: $waveId) { id ref status location { id ref attributes { name type value } } fulfilments(first: 100) { edges { node { id ref type status toAddress { id ref } items(first: 100) { edges { node { ref filledQuantity rejectedQuantity requestedQuantity attributes { name type value } } } } order { retailer { ref id } id ref type status fulfilmentChoice { deliveryType } customer { firstName lastName primaryEmail primaryPhone } } } } } }}",
3 "attributes": [
4 {
5 "value": "{{order.ref}}",
6 "label": [
7 "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.order.ref.heading",
8 "Order reference"
9 ],
10 "hideBelow": "sm"
11 },
12 {
13 "value": "{{order.customer.firstName}} {{customer.lastName}}",
14 "label": [
15 "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.customer.name.heading",
16 "Customer name"
17 ]
18 },
19 {
20 "value": "{{orderType}}",
21 "label": [
22 "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.order.type.heading",
23 "Order type"
24 ]
25 },
26 {
27 "value": "{{order.retailer.ref}} - {{order.retailer.id}}",
28 "label": [
29 "Retailer",
30 "Retailer"
31 ]
32 },
33 {
34 "value": "{{status}}",
35 "label": [
36 "fc.sf.ui.wave.pickAndPack.list.pack.multiparcel.column.fulfilment.status.heading",
37 "Fulfilment status"
38 ]
39 },
40 {
41 "value": "{{id}}",
42 "label": [
43 "FulFilment ID",
44 "FulFilment ID"
45 ]
46 },
47 {
48 "value": "{{type}}",
49 "label": [
50 "FulFilment Type",
51 "FulFilment Type"
52 ]
53 },
54 {
55 "value": "{{type}}",
56 "label": [
57 "item->attributes",
58 "FulFilment Type"
59 ]
60 }
61 ],
62 "allowMultipleParcelsPerItem": true,
63 "parcelTypes": {
64 "defaultParcel": "small",
65 "parcels": [
66 {
67 "name": "small",
68 "length": "18",
69 "width": "18",
70 "height": "18",
71 "barcode": "1234",
72 "defaultWeight": "3",
73 "minWeight": "0.1",
74 "maxWeight": "4"
75 },
76 {
77 "name": "medium",
78 "length": "30",
79 "width": "30",
80 "height": "30",
81 "barcode": "4567",
82 "defaultWeight": "8",
83 "minWeight": "5",
84 "maxWeight": "9.9"
85 },
86 {
87 "name": "large",
88 "length": "45",
89 "width": "45",
90 "height": "45",
91 "barcode": "7890",
92 "defaultWeight": "19",
93 "minWeight": "10",
94 "maxWeight": "20"
95 },
96 {
97 "name": "extra_large",
98 "length": "90",
99 "width": "90",
100 "height": "90",
101 "barcode": "99999999",
102 "defaultWeight": "30",
103 "minWeight": "10",
104 "maxWeight": "20"
105 }
106 ]
107 }
108}
1POST: {{fluentApiHost}}/graphql
2
3// create a postman environment variable:
4// Variable: json_value
5// initial val + current value:
6{
7 "parcelTypes": {
8 "parcels": [
9 {
10 "name": "small",
11 "length": "18",
12 "width": "18",
13 "height": "18",
14 "barcode": "1234",
15 "defaultWeight": "3",
16 "minWeight": "0.1",
17 "maxWeight": "4"
18 },
19 {
20 "name": "medium",
21 "length": "30",
22 "width": "30",
23 "height": "30",
24 "barcode": "4567",
25 "defaultWeight": "8",
26 "minWeight": "5",
27 "maxWeight": "9.9"
28 },
29 {
30 "name": "large",
31 "length": "45",
32 "width": "45",
33 "height": "45",
34 "barcode": "7890",
35 "defaultWeight": "19",
36 "minWeight": "10",
37 "maxWeight": "20"
38 }
39 ]
40 }
41}
42
43
44GraphQL variables:
45{
46 "retailerId": {{retailer_id}},
47 "lobValue" : {{json_value}}
48}
49
50
51GraphQL Query:
52mutation CreateSetting($retailerId:Int! , $lobValue:Json) {
53createSetting(input: {
54 name: "fc.mystique.fields.basicpack",
55 valueType: "JSON",
56 lobValue:$lobValue ,
57 context: "ACCOUNT",
58 contextId:$retailerId}) {
59 id
60 name
61 }
62}
1POST: {{fluentApiHost}}/graphql
2
3// create a postman environment variable:
4// Variable: json_value
5// initial val + current value:
6{
7 "parcelTypes": {
8 "parcels": [
9 {
10 "name": "small",
11 "length": "18",
12 "width": "18",
13 "height": "18",
14 "barcode": "1234",
15 "defaultWeight": "3",
16 "minWeight": "0.1",
17 "maxWeight": "4"
18 },
19 {
20 "name": "medium",
21 "length": "30",
22 "width": "30",
23 "height": "30",
24 "barcode": "4567",
25 "defaultWeight": "8",
26 "minWeight": "5",
27 "maxWeight": "9.9"
28 },
29 {
30 "name": "large",
31 "length": "45",
32 "width": "45",
33 "height": "45",
34 "barcode": "7890",
35 "defaultWeight": "19",
36 "minWeight": "10",
37 "maxWeight": "20"
38 }
39 ]
40 }
41}
42
43
44GraphQL variables:
45{
46 "retailerId": {{retailer_id}},
47 "lobValue" : {{json_value}}
48}
49
50
51GraphQL Query:
52mutation updateSetting($retailerId:Int! , $lobValue:Json) {
53updateSetting(input: {
54 id: 5001471,
55 name: "fc.mystique.fields.basicpack",
56 valueType: "JSON",
57 lobValue: $lobValue,
58 context: "ACCOUNT",
59 contextId: $retailerId}) {
60 id
61 name
62 }
63}
64