Loymax, 2026

Wiki source code of Orders


Hide last authors
Andrej Rylov 1.1 1 (% class="lead" %)
Andrej Rylov 2.1 2 An **Order** is a customer request for a product or service placed via a website or mobile application.
Andrej Rylov 1.1 3
4 (% class="box" %)
5 (((
6 * [[Order structure>>doc:||anchor="Structure"]]
7 * [[Order functionality integration>>doc:||anchor="Integration"]]
8 * [[Instructions for working with order functionality>>doc:||anchor="Instructions"]]
9 )))
10
11 (% class="box infomessage" %)
12 (((
Andrej Rylov 2.1 13 * **Orders** are an optional feature that is not enabled by default. To activate this functionality, contact Loymax specialists.
Andrej Rylov 1.1 14 * Visibility of orders/order lines in various System sections is controlled by a feature flag. When the flag is enabled, the corresponding tabs and functional capabilities become available.
15 )))
16
Andrej Rylov 17.1 17 Unlike a [[receipt>>doc:Main.Smart_Communications.SMC_Use.Customers.All_clients.WebHome||anchor="HReceipts"]], which records the fact of payment and the list of purchased items, an [[order>>doc:Main.Smart_Communications.SMC_Use.Customers.All_clients.WebHome||anchor="HOrders"]] contains a broader dataset: customer information, order value, order statuses, fulfillment details, payment, and delivery data, as well as order contents. Like receipts, orders are used for building segments for subsequent [[communications>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.WebHome]] with customers and serve as the basis for analyzing purchasing behavior and generating [[reports>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.Mailing_report.WebHome]].
Andrej Rylov 1.1 18
19 === Order structure {{id name="Structure"/}} ===
20
21 In addition to standard data typical for receipt entities, orders have the following attributes:
22
Andrej Rylov 22.1 23 * **Statuses**—three status types are available for each order. Users can create statuses of the respective types in the section [[Settings ~> Order statuses>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Order_statuses.WebHome]].
Andrej Rylov 1.1 24 ** **General**: includes general stages of the order lifecycle. For example: received, confirmed, in progress, completed.
Andrej Rylov 2.1 25 ** **Delivery**: includes stages related to order delivery. For example: being assembled, shipped, at pickup point, delivered.
26 ** **Payment**: includes stages related to order payment. For example: invoice issued, awaiting payment, paid.
Andrej Rylov 1.1 27 * **Delivery block**
28 ** Delivery status,
29 ** Delivery type: courier, self-pickup, pickup point,
30 ** Provider: shipping carrier handling order delivery,
31 ** Address: country, city, street,
32 ** Date and time,
Andrej Rylov 2.1 33 ** Customer note.
Andrej Rylov 1.1 34 * **Payment block**
35 ** Payment status,
36 ** Payment type: card, cash, cash on delivery,
37 ** Payment provider: multiple payment providers can be configured,
38 ** Order amount information:
39 *** Total order amount,
40 *** Cash payment,
41 *** Bonus payment,
42 *** Delivery cost,
43 *** Discount.
44 * **Order contents block**
45 ** Number of items,
46 ** Item cost,
47 ** Order line total,
48 ** Item weight,
49 ** Discount amount,
50 ** Bonus accrual and deduction,
51 ** Cash amount.
52
Andrej Rylov 17.1 53 All the above order attributes can be used for customer communications via [[mass messagings>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.WebHome]] and marketing [[campaigns>>doc:Main.Smart_Communications.SMC_Use.Campaigns.WebHome]].
Andrej Rylov 1.1 54
55 {{showhide showmessage="Show sample order structure in REST API request" hidemessage="Hide sample order structure"}}
56 (% class="table-bordered" %)
57 (% class="info" %)|(% style="width:870px" %)**Sample order structure in REST API request**|(% style="width:781px" %)**Request parameters**
58 |(% style="width:870px" %)(((
59 {{code language="xml"}}
60 {
61 "data": {
62 "attributes": {
63 "external_id": "1050",
64 "client_external_id": "724",
65 "date": "2020-07-03 17:30:22",
66 "number": "1218/112",
67 "items_cnt": 1,
68 "items_sum": 200.3,
69 "status_code": "new",
70 "unit": "",
71 "actions": "",
72 "delivery": {
73 "status_code": "delivered",
74 "type": "",
75 "provider": "",
76 "country": "",
77 "city": "",
78 "address": "",
79 "date": "",
80 "time": "",
81 "note": ""
82 },
83 "payment": {
84 "status_code": "paid",
85 "type": "",
86 "provider": "",
87 "total": 200.3,
88 "cash": 190,
89 "bonuses": 15,
90 "delivery": 20,
91 "discount": 24.87
92 },
93 "items": [
94 {
95 "external_id": "577",
96 "product_external_id": "789",
97 "cnt": 1,
98 "sum": 120,
99 "price": 120,
100 "quantity": 0,
101 "discount": 0,
102 "bonus_to_card": 0,
103 "bonus_from_card": 0,
104 "cash_sum": 0
105 }
106 ]
107 }
108 }
109 }
110 {{/code}}
111 )))|(% style="width:781px" %)(((
112 * **external_id**—external order identifier
113 * **client_external_id**—external user identifier
114 * **date**—order date. If not specified, current date and time are used
115 * **number**—order number
116 * **items_cnt**—number of products in the order
117 * **items_sum**—order value
118 * **status_code**—general order status
119 * **unit**—point of sale
120 * **actions**—offers
121 * **delivery**—delivery block:
122 ** status_code—delivery status
123 ** type—delivery type
124 ** provider—delivery provider
125 ** country—delivery country
126 ** city—delivery city
127 ** address—delivery address
128 ** date—delivery date
129 ** time—delivery time
Andrej Rylov 2.1 130 ** note—customer note
Andrej Rylov 1.1 131 * **payment**—payment block:
132 ** status_code—payment status
133 ** type—payment method type
134 ** provider—payment provider
135 ** total—total paid
136 ** cash—paid in cash
137 ** bonuses—paid with bonus points
138 ** delivery—delivery cost
139 ** discount—discount amount
140 * **items**—order contents:
141 ** external_id—order line identifier in the user's information system
142 ** product_external_id—product identifier
143 ** cnt—product quantity
144 ** sum—order line total
145 ** price—product cost
146 ** quantity—item weight
147 ** discount—discount
148 ** bonus_to_card—bonus points accrued
149 ** bonus_from_card—bonus points deducted
150 ** cash_sum—cash amount
151 )))
152 {{/showhide}}
153
154 === Order functionality integration {{id name="Integration"/}} ===
155
156 Order functionality integration is performed by contacting Loymax specialists and includes the following steps:
157
158 1. Enable the **EnableShopEorders** feature flag, which activates visibility of tabs and toggles for orders/order lines across various System sections.
Andrej Rylov 21.1 159 1. Configure [[fields>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Data_field.WebHome]] to match the Partner's business processes.
Andrej Rylov 22.1 160 1. Configure [[order statuses>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Order_statuses.WebHome]].
Andrej Rylov 1.1 161 1. Testing.
162
163 ==== Instructions for working with order functionality can be found in the relevant sections: {{id name="Instructions"/}} ====
164
165 (% class="table-bordered" %)
166 |(% style="width:423px" %)(((
167 (% class="lead" %)
168 Analytics and reports
169 )))|(% style="width:1019px" %)(((
Andrej Rylov 15.1 170 You can switch between receipts and orders (provided both functionalities are enabled) in all reports for [[mass messagings>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.Mailing_report.WebHome]] and [[campaigns>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Report.WebHome]], including the [[dashboard>>doc:Main.Smart_Communications.SMC_Use.Overview.WebHome]], as well as consolidated reports in the **Analytics** section.
Andrej Rylov 1.1 171
172 (% class="box infomessage" %)
173 (((
Andrej Rylov 22.1 174 Reports include only orders with statuses marked with the **Include in analytics** flag during creation/editing. Order statuses can be created in the section [[Settings ~> Order statuses>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Order_statuses.WebHome]].
Andrej Rylov 1.1 175 )))
176 )))
177 |(% style="width:423px" %)(((
178 (% class="lead" %)
179 Attribution
Andrej Rylov 2.1 180 )))|(% style="width:1019px" %)(((
181 **Attribution** is a configurable criterion that links orders to communications sent to the customer.
182
Andrej Rylov 18.1 183 Similar to [[receipt attribution>>doc:Main.Smart_Communications.SMC_Use.Receipt_attribution.WebHome]], order attribution is available for [[mass messagings>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.WebHome]] and [[campaigns>>doc:Main.Smart_Communications.SMC_Use.Campaigns.WebHome]].
Andrej Rylov 2.1 184 )))
Andrej Rylov 1.1 185 |(% style="width:423px" %)(((
186 (% class="lead" %)
Andrej Rylov 16.1 187 [[Template engine macros>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.Template_engine.WebHome||anchor="HSystemVariables"]]
Andrej Rylov 1.1 188 )))|(% style="width:1019px" %)(((
Andrej Rylov 16.1 189 For customizing message text in [[mass messagings>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.Template_engine.WebHome]] and [[campaigns>>doc:Main.Smart_Communications.SMC_Use.Campaigns.WebHome]], the following template engine macros are supported for order functionality:
Andrej Rylov 1.1 190
Andrej Rylov 2.1 191 * Customer orders count
Andrej Rylov 1.1 192 * Total amount of all customer orders
193 * Date of customer's first/last order
194 * Number of customer's first/last order
195 * Value of attribute in customer's first/last order
196 * Contents of customer's first/last order
197 )))
198 |(% style="width:423px" %)(((
199 (% class="lead" %)
Andrej Rylov 5.1 200 API methods for working with orders
Andrej Rylov 1.1 201 )))|(% style="width:1019px" %)(((
202 The following API methods are available for working with orders:
203
204 * Register an order
205 * Update order status
206 * Get a list of orders
207 * Get an order by external identifier
208 * Get a list of customer orders by customer external identifier
209 * Link an order to a receipt
210 * Delete an order
211 )))
212 |(% style="width:423px" %)(((
213 (% class="lead" %)
Andrej Rylov 21.1 214 [[Fields>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Data_field.WebHome]]
Andrej Rylov 1.1 215 )))|(% style="width:1019px" %)(((
216 The fields configuration section allows managing the set of fields for orders and order lines. System fields are present by default. Users can also create custom fields for orders and order lines, which can be deleted or edited.
217
218 (% class="table-bordered" %)
219 (% class="info" %)|(% style="width:647px" %)**Example list of order fields**|(% style="width:686px" %)**Example list of order line fields**
Andrej Rylov 5.1 220 |(% style="width:647px" %){{lightbox image="order_fields.png" width="700"/}}|(% style="width:686px" %){{lightbox image="order_item_fields.png" width="700"/}}
Andrej Rylov 1.1 221
Andrej Rylov 20.1 222 It is also possible to [[manage field display>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Data_field.Views_management.WebHome]]: for orders and order lines, you can change which fields are displayed in the [[customer profile>>doc:Main.Smart_Communications.SMC_Use.Customers.All_clients.WebHome||anchor="HCustomerprofile"]] and in what order.
Andrej Rylov 1.1 223 )))
224 |(% style="width:423px" %)(((
225 (% class="lead" %)
Andrej Rylov 11.1 226 [[Segment builder>>doc:Main.Smart_Communications.SMC_Use.Customers.User_segments.Segment_builder.WebHome]]
Andrej Rylov 1.1 227 )))|(% style="width:1019px" %)(((
228 For customer segmentation using order data, the **Segment builder** provides the following filters:
229
230 * **Customer**
231 ** Number of orders
232 ** Number of attributed orders
233 ** Date of first/last order
234 ** Days since first/last order
235 ** Average order amount
236 ** Average number of items per order
237 ** Total order value
238 ** Last order value
239 ** Median order amount
240 ** Average item price in order
241 * **Order**
242 ** Last order/delivery/payment status
243 ** Identifier
244 ** Date
245 ** Status
246 ** Number
247 ** Item quantity/value
248 ** Point of sale
249 ** Offers
250 ** Card
251 ** Delivery status/type
252 ** Delivery provider
253 ** Delivery country/city/address
254 ** Delivery date/time
255 ** Delivery comment
256 ** Payment status/type
257 ** Total paid
258 ** Paid in cash/bonus points
259 ** Delivery cost
260 ** Discount amount
261 * **Order contents**
262 ** Average item price
263 ** Identifier
264 ** Quantity
265 ** Value
266 ** Price
267 ** Item weight
268 ** Discount
269 ** Bonus points accrued
270 ** Bonus points deducted
271 ** Cash amount
272 * **Interaction**
273 ** Ordered via email campaign
274 ** Ordered via SMS campaign
275 ** Ordered via push campaign
276 ** Ordered via campaign
277 )))
278 |(% style="width:423px" %)(((
279 (% class="lead" %)
Andrej Rylov 9.1 280 [[Customer profile>>doc:Main.Smart_Communications.SMC_Use.Customers.All_clients.WebHome||anchor="HCustomerprofile"]]
Andrej Rylov 1.1 281 )))|(% style="width:1019px" %)(((
Andrej Rylov 9.1 282 * When order functionality is enabled, a separate [[orders>>doc:Main.Smart_Communications.SMC_Use.Customers.All_clients.WebHome||anchor="HOrders"]] tab appears in the customer profile, displaying detailed information about all customer orders, including payment, delivery, item quantity, and order value.
283 * The [[Activity>>doc:Main.Smart_Communications.SMC_Use.Customers.All_clients.WebHome||anchor="HActivity"]] tab in the customer profile also displays customer order information.
Andrej Rylov 15.1 284 * For orders whose statuses are included in statistics and [[reports>>doc:Main.Smart_Communications.SMC_Use.Mass_messaging.Mailing_report.WebHome]], the following [[metrics>>doc:Main.Smart_Communications.SMC_Use.Customers.User_segments.Segment_builder.Metrics.WebHome]] are available in the customer profile:
Andrej Rylov 1.1 285 ** Number of orders
286 ** Total order value
287 ** Average order value
288 ** Average number of items per order
289 )))
290 |(% style="width:423px" %)(((
291 (% class="lead" %)
Andrej Rylov 22.1 292 [[Order statuses>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Order_statuses.WebHome]]
Andrej Rylov 1.1 293 )))|(% style="width:1019px" %)(((
Andrej Rylov 23.1 294 Viewing and creating order statuses is available in the [[Settings>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.WebHome]] > **Order statuses** section. Three status types are available for orders:
Andrej Rylov 1.1 295
296 * General
Andrej Rylov 2.1 297 * Delivery
298 * Payment
Andrej Rylov 1.1 299 )))
300 |(% style="width:423px" %)(((
301 (% class="lead" %)
Andrej Rylov 13.1 302 [[Triggers>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome]] for orders
Andrej Rylov 1.1 303 )))|(% style="width:1019px" %)(((
Andrej Rylov 14.1 304 A **Trigger **is an event that activates a [[campaign>>doc:Main.Smart_Communications.SMC_Use.Campaigns.WebHome]]. The following triggers are available for order functionality:
Andrej Rylov 1.1 305
Andrej Rylov 13.1 306 * [[Days since order>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="HDayssinceorder"]]
307 * [[Item ordered>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="HItemordered"]]
308 * [[Item from category ordered>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="HItemfromspecificcategoryordered"]]
309 * [[Order status changed>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="HOrderstatuschanged"]]
310 * [[Date come for order>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="HDatecomefororder"]]
311 * [[Order created>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="HOrdercreated"]]
Andrej Rylov 1.1 312 )))
313 |(% style="width:423px" %)(((
314 (% class="lead" %)
Andrej Rylov 11.1 315 [[Export>>doc:Main.Smart_Communications.SMC_Use.Customers.User_segments.Segment_builder.WebHome||anchor="02"]]
Andrej Rylov 1.1 316 )))|(% style="width:1019px" %)(((
Andrej Rylov 11.1 317 In customer lists within the [[Segment builder>>doc:Main.Smart_Communications.SMC_Use.Customers.User_segments.Segment_builder.WebHome]] and consolidated reports in the **Analytics** section, you can export order and order line data to a file.
Andrej Rylov 1.1 318 )))