DEFAULT.COORDINATES
Setting
Changed on:
28 Aug 2023
Setting Area | Workflow |
---|---|
Supported context levels: | RETAILER |
Overview
If the rule parameter is set to true and the Google Geocoding request fails or the response contains no result, the DEFAULT.COORDINATES setting will be used. this setting is also used by a few rules such as `ValidateOrderDeliveryAddress`
Values
Data Type | Values |
---|---|
JSON | Sample Value:
|
Configuration example
1POST: {{fluentApiHost}}/graphql
2
3// create a postman environment variable:
4// Variable: json_value
5// initial val + current value:
6{
7
8"coordinates":[
9
10 {
11
12 "latitude": -35.306768,
13
14 "longitude": 149.126355,
15
16 "postCodeRangeEnd": 2619,
17
18 "postCodeRangeStart": 2600
19
20 },
21
22 {
23
24 "latitude": -35.306768,
25
26 "longitude": 149.126355,
27
28 "postCodeRangeEnd": 2920,
29
30 "postCodeRangeStart": 2900
31
32 }
33}
34
35
36GraphQL variables:
37{
38 "retailerId": {{retailer_id}},
39 "lobValue" : {{json_value}}
40}
41
42
43GraphQL Query:
44mutation CreateSetting($retailerId:Int! , $lobValue:Json) {
45createSetting(input: {
46 name: "DEFAULT.COORDINATES",
47 valueType: "JSON",
48 lobValue:$lobValue ,
49 context: "RETAILER",
50 contextId:$retailerId}) {
51 id
52 name
53 }
54}
Language: graphqlschema
Update example
1POST: {{fluentApiHost}}/graphql
2
3// create a postman environment variable:
4// Variable: json_value
5// initial val + current value:
6{
7
8"coordinates":[
9
10{
11
12 "latitude": -35.306768,
13
14 "longitude": 149.126355,
15
16 "postCodeRangeEnd": 2619,
17
18 "postCodeRangeStart": 2600
19
20 },
21
22 {
23
24 "latitude": -35.306768,
25
26 "longitude": 149.126355,
27
28 "postCodeRangeEnd": 2920,
29
30 "postCodeRangeStart": 2900
31
32 }
33}
34
35
36GraphQL variables:
37{
38 "retailerId": {{retailer_id}},
39 "lobValue" : {{json_value}}
40}
41
42
43mutation updateSetting($retailerId:Int! , $lobValue:Json) {
44updateSetting(input: {
45 id: 5001471,
46 name: "DEFAULT.COORDINATES",
47 valueType: "JSON",
48 lobValue: $lobValue,
49 context: "RETAILER",
50 contextId: $retailerId}) {
51 id
52 name
53 }
54}
55
56
Language: graphqlschema