RETURN_REASON
Changed on:
22 Oct 2024
Setting Area | UI component, Workflow |
---|---|
Supported context levels: | RETAILER |
Overview
This setting contains a list of possible return reasons that can be associated with each returned item. These values should correspond to the different reasons for customers to return items.
This list of reasons will be used to populate the reasons dropdown on the returns field.
Values
Data Type | Values |
---|---|
JSON |
Language: json Name: Sample Values: Description: Sample Values in JSON format |
Detailed technical description
Schema
This schema describes the structure of a RETURN_REASON setting.
1{
2 "title": "Return Reasons",
3 "type": "array",
4 "description": "This is the configuration setting that controls what reasons can be selected when an order is returned.",
5 "items": {
6 "type": "object",
7 "description": "This is the list of return reasons",
8 "properties": {
9 "label": {
10 "title": "Label",
11 "description": "Put the label you want the business user or store associate to see here",
12 "type": "string"
13 },
14 "value": {
15 "title": "Value",
16 "description": "The internal code or id for a return reason. This is used to internally identify a reason and should stay constant while the label can change.",
17 "type": "string"
18 }
19 },
20 "required": [
21 "label",
22 "value"
23 ]
24 }
25}
Language: json
Name: Schema
Description:
[Warning: empty required content area]Configuration example
1POST: {{fluentApiHost}}/graphql
2
3// create a postman environment variable:
4// Variable: json_value
5// initial val + current value:
6[
7 {
8 "label": "Wrong Size",
9 "value": "WRONGSIZE"
10 },
11 {
12 "label": "Broken",
13 "value": "BROKEN"
14 },
15 {
16 "label": "Doesn't match the description",
17 "value": "WRONG_DESCRIPTION"
18 },
19 {
20 "label": "Change of mind",
21 "value": "CHANGE_MIND"
22 }
23]
24
25
26GraphQL variables:
27{
28 "retailerId": {{retailer_id}},
29 "lobValue" : {{json_value}}
30}
31
32
33GraphQL Query:
34mutation CreateSetting($retailerId:Int! , $lobValue:Json) {
35createSetting(input: {
36 name: "RETURN_REASON",
37 valueType: "JSON",
38 lobValue:$lobValue ,
39 context: "RETAILER",
40 contextId:$retailerId}) {
41 id
42 name
43 }
44}
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
8 {
9 "label": "Wrong Size",
10 "value": "WRONGSIZE"
11 },
12 {
13 "label": "Broken",
14 "value": "BROKEN"
15 },
16 {
17 "label": "Doesn't match the description",
18 "value": "WRONG_DESCRIPTION"
19 },
20 {
21 "label": "Change of mind",
22 "value": "CHANGE_MIND"
23 }
24
25]
26
27
28GraphQL variables:
29{
30 "retailerId": {{retailer_id}},
31 "lobValue" : {{json_value}}
32}
33
34
35mutation updateSetting($retailerId:Int! , $lobValue:Json) {
36updateSetting(input: {
37 id: 5001471,
38 name: "RETURN_REASON",
39 valueType: "JSON",
40 lobValue: $lobValue,
41 context: "RETAILER",
42 contextId: $retailerId}) {
43 id
44 name
45 }
46}
47
48
Language: json