Fluent Commerce Logo
Docs
Sign In

fc.mystique.fields.basicpack

Setting

Changed on:

13 Dec 2023

Overview

The Multi-Parcel field is configurable via the 

`fc.mystique.fields.basicpack`
 setting.

Setting AreaUI component, Orders, Workflow
Supported context levels:ACCOUNT RETAILER AGENT

Overview

The Multi-Parcel field is configurable via the 

`fc.mystique.fields.basicpack`
 setting.

Values

Data TypeValues
JSON

sample value:

`{`

 "parcelTypes": {
   "parcels": [
     {
       "name": "small",
       "length": "18",
       "width": "18",
       "height": "18",
       "barcode": "1234",
       "defaultWeight": "3",
       "minWeight": "0.1",
       "maxWeight": "4"
     },
     {
       "name": "medium",
       "length": "30",
       "width": "30",
       "height": "30",
       "barcode": "4567",
       "defaultWeight": "8",
       "minWeight": "5",
       "maxWeight": "9.9"
     },
     {
       "name": "large",
       "length": "45",
       "width": "45",
       "height": "45",
       "barcode": "7890",
       "defaultWeight": "19",
       "minWeight": "10",
       "maxWeight": "20"
     }
   ]
 }
}

Detailed 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 location 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.


See the Multi-Parcel Component for details.


Configuration example

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}

Language: json

Update example

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

Language: json

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