Fluent Commerce Logo
Docs
Sign In

DEFAULT.COORDINATES

Setting

Changed on:

28 Aug 2023

Setting AreaWorkflow
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

 

Values

Data TypeValues
JSON

Sample Value:

`{`

`  "coordinates":[`

`    {`

`      "latitude": -35.306768,`

`      "longitude": 149.126355,`

`      "postCodeRangeEnd": 299,`

`      "postCodeRangeStart": 200`

`    },`

`    {`

`      "latitude": -35.306768,`

`      "longitude": 149.126355,`

`      "postCodeRangeEnd": 2619,`

`      "postCodeRangeStart": 2600`

`    },`

`    {`

`      "latitude": -35.306768,`

`      "longitude": 149.126355,`

`      "postCodeRangeEnd": 2920,`

`      "postCodeRangeStart": 2900`

`    },`

`    {`

`      "latitude": -37.814563,`

`      "longitude": 144.970267,`

`      "postCodeRangeEnd": 3999,`

`      "postCodeRangeStart": 3000`

`    },`

`    {`

`      "latitude": -37.814563,`

`      "longitude": 144.970267,`

`      "postCodeRangeEnd": 8999,`

`      "postCodeRangeStart": 8000`

`    },`

`    {`

`      "latitude": -27.46758,`

`      "longitude": 153.027892,`

`      "postCodeRangeEnd": 4999,`

`      "postCodeRangeStart": 4000`

`    },`

`    {`

`      "latitude": -27.46758,`

`      "longitude": 153.027892,`

`      "postCodeRangeEnd": 9999,`

`      "postCodeRangeStart": 9000`

`    },`

`    {`

`      "latitude": -34.92577,`

`      "longitude": 138.599732,`

`      "postCodeRangeEnd": 5999,`

`      "postCodeRangeStart": 5000`

`    },`

`    {`

`      "latitude": -31.924074,`

`      "longitude": 115.91223,`

`      "postCodeRangeEnd": 6999,`

`      "postCodeRangeStart": 6000`

`    },`

`    {`

`      "latitude": -42.882743,`

`      "longitude": 147.330234,`

`      "postCodeRangeEnd": 7999,`

`      "postCodeRangeStart": 7000`

`    },`

`    {`

`      "latitude": -12.801028,`

`      "longitude": 130.955789,`

`      "postCodeRangeEnd": 999,`

`      "postCodeRangeStart": 800`

`    },`

`    {`

`      "latitude": -33.867139,`

`      "longitude": 151.207114,`

`      "postCodeRangeEnd": 2599,`

`      "postCodeRangeStart": 1000`

`    },`

`    {`

`      "latitude": -33.867139,`

`      "longitude": 151.207114,`

`      "postCodeRangeEnd": 2899,`

`      "postCodeRangeStart": 2620`

`    },`

`    {`

`      "latitude": -33.867139,`

`      "longitude": 151.207114,`

`      "postCodeRangeEnd": 2999,`

`      "postCodeRangeStart": 2921`

`    }`

`  ]`

` `

`}`

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

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