Pedido Multi Origem
Neste ponto vamos entender qual o fluxo a ser seguido nos pedidos multi CD.
No caso de pedidos onde a conta possua um multi CD (Warehouses diferentes), ao consumi-los na fila de integração de pedidos (queues), será possivel identificar de qual CD (Warehouse) o pedido deve ser despachado.
Para identificar o CD (Warehouse), é possível identificar através do campo conforme exemplo abaixo:
1
"pick_ups": [{
2
"store_code": "L052",
3
"items": [{
4
"qty": 1,
5
"product_id": "4282443",
6
"id": "4282443"
7
}]
Copied!
Onde "store_code" será informando o CD (Warehouse) de despacho do pedido.
Segue a baixo um Json de exemplo, do consumo na queues:
1
{
2
"placed_at": "2019-10-16T14:50:54-03:00",
3
"calculation_type": "spreadsheet",
4
"seller_shipping_cost": 0.0,
5
"status": {
6
"type": "DELIVERED",
7
"label": "Completo (entregue) (SkyHub)",
8
"code": "complete"
9
},
10
"shipping_estimate_id": "4ffd38ed65ac40c883ea0c327acdf221",
11
"shipped_date": "2019-10-16T20:50:32.484000",
12
"tags": [],
13
"payments": [{
14
"value": 813.99,
15
"transaction_date": "2019-10-16T16:48:00-03:00",
16
"status": null,
17
"sefaz": {
18
"type_integration": "1",
19
"payment_indicator": "1",
20
"name_payment": "Cartão de Crédito",
21
"name_card_issuer": "Mastercard",
22
"id_payment": "3",
23
"id_card_issuer": "02"
24
},
25
"parcels": 12,
26
"method": "CREDIT_CARD",
27
"description": "No valor de: 813.99",
28
"card_issuer": "00558456000171",
29
"autorization_id": "016304"
30
}],
31
"import_info": {
32
"ss_name": "Lojas Americanas",
33
"remote_id": "02-111111111",
34
"remote_code": "111111111111"
35
},
36
"shipping_cost": 14.99,
37
"estimated_delivery_shift": null,
38
"billing_address": {
39
"street": "Rua Nossa Senhora",
40
"secondary_phone": "71 000000000",
41
"region": "BA",
42
"reference": "Em frente a Pitta Segurança",
43
"postcode": "40290250",
44
"phone": "71 00000000",
45
"number": "05",
46
"neighborhood": "Acupe de Brotas",
47
"full_name": "JACIARA",
48
"detail": "Em frente a Pitta Segurança",
49
"country": "BR",
50
"complement": null,
51
"city": "Salvador"
52
},
53
"shipping_method": null,
54
"discount": 0.0,
55
"customer": {
56
"vat_number": "76860543817",
57
"phones": ["71 0000000", "71 00000000"],
58
"name": "JACIARA",
59
"gender": "",
60
"email": "[email protected]",
61
"date_of_birth": "1979-04-26"
62
},
63
"total_ordered": 813.99,
64
"shipping_address": {
65
"street": "RUA Nossa Senhora",
66
"secondary_phone": "71 00000000",
67
"region": "BA",
68
"reference": "Em frente a Pitta Segurança",
69
"postcode": "40290250",
70
"phone": "71 0000000",
71
"number": "05",
72
"neighborhood": "Acupe de Brotas",
73
"full_name": "JACIARA",
74
"detail": "Em frente a Pitta Segurança",
75
"country": "BR",
76
"complement": null,
77
"city": "Salvador"
78
},
79
"exported_at": "2019-10-16T18:45:57-03:00",
80
"updated_at": "2019-10-16T17:46:17-03:00",
81
"sync_status": "SYNCED",
82
"delivered_date": "2019-10-16T18:39:55-03:00",
83
"items": [{
84
"special_price": 799.0,
85
"shipping_cost": 14.99,
86
"remote_store_id": null,
87
"qty": 1,
88
"product_id": "4282443",
89
"original_price": 799.0,
90
"name": "LG K12+ 32GB AZUL",
91
"id": "4282443",
92
"gift_wrap": null,
93
"detail": null
94
}],
95
"approved_date": "2019-10-16T19:55:27.021000",
96
"channel": "Lojas Americanas",
97
"pick_ups": [{
98
"store_code": "L052",
99
"items": [{
100
"qty": 1,
101
"product_id": "4282443",
102
"id": "4282443"
103
}],
104
"agent": {
105
"vat_number": null,
106
"name": null
107
}
108
}],
109
"invoices": [{
110
"volume_qty": null,
111
"number": "000032613",
112
"line": "001",
113
"key": "12345678901234567890123456789012345678901234",
114
"issue_date": "2019-10-22T11:39:23-03:00"
115
}],
116
"code": "Lojas Americanas-111111111111",
117
"interest": 0.0,
118
"delivery_contract_type": "SHIPSTORE",
119
"estimated_delivery": "2019-10-16T00:00:00-03:00",
120
"shipping_carrier": "",
121
"shipments": [{
122
"tracks": [{
123
"url": null,
124
"method": null,
125
"code": "T3JkZXJOb2RlOjE3NjkyOTYy",
126
"carrier": "SPREADSHEET"
127
}],
128
"items": [{
129
"sku": "4282443",
130
"qty": 1
131
}],
132
"code": "Lojas Americanas-111111111111"
133
}],
134
"imported_at": "2019-10-16T14:55:13-03:00"
135
}
136
Copied!
Last modified 24d ago
Copy link