forked from OMGStandards/DigitalReceipt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
summary.yaml
472 lines (447 loc) · 13.4 KB
/
summary.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
BusinessUnitSummary:
description: |
Summary of business unit activity.
type: object
properties:
periodType:
description: |
Type of the business period for which the summary is captured.
$ref: "#/SummaryPeriodTypeEnum"
metrics:
description: |
Store business metrics
$ref: "#/Metrics"
summaryPerWorkstation:
description: |
Summary data per workstation
$ref: "#/WorkstationSummaryCollection"
additionalProperties: false
SummaryPeriodTypeEnum:
description: |
Type of the period for summary.
Shift - open application to do business operations
BusinessDay - close application, business operation no longer allowed
type: string
enum:
- Shift
- BusinessDay
Metrics:
description: |
A set of quantifiable measures that is used to track and assess the
performance, efficiency and quality of retail operations. Metrics
can be captured in a certain context. For example, they can be business
unit metrics or metrics for a particular workstation.
type: object
properties:
transactionCounts:
description: |
Set of transaction counts.
$ref: "#/TransactionCounts"
transactionCountsPerType:
description: |
Transaction Counts for different types of transactions.
$ref: "#/TransactionTypeCountsCollection"
tradeMetrics:
description: |
Counts for different types of transactions.
$ref: "#/TradeMetrics"
customMetrics:
description: |
Collection of customized metrics.
$ref: "#/CustomMetricGroupCollection"
additionalProperties: false
WorkstationSummary:
description: |
Summary of workstation activity captured in some types of transacions.
type: object
properties:
periodType:
description: |
Type of the business period for which the summary is captured.
$ref: "#/SummaryPeriodTypeEnum"
clientDeviceID:
description: |
A unique identifier of a client device.
type: string
workstationNumber:
description: |
A unique within BusinessUnit meaningful number for workstation.
type: integer
format: int32
firstSequenceNumber:
description: |
The first transaction sequence number
type: integer
format: int32
lastSequenceNumber:
description: |
The last transaction sequence number
type: integer
format: int32
metrics:
description: |
Store business metrics
$ref: "#/Metrics"
additionalProperties: false
WorkstationSummaryCollection:
description: |
Collection of workstation summaries.
type: array
items:
$ref: "#/WorkstationSummary"
TransactionCounts:
description: |
Counts of transactions.
type: object
properties:
transactionCount:
description: |
Count of all transactions.
type: integer
format: int32
suspendedTransactionCount:
description: |
Count of suspended transactions.
type: integer
format: int32
resumedTransactionCount:
description: |
Count of resumed transactions.
type: integer
format: int32
voidedInProcessTransactionCount:
description: |
Count of transactions that have been voided before completion.
type: integer
format: int32
postVoidedTransactionCount:
description: |
Count of transactions that post void another transaction.
type: integer
format: int32
erroredTransactionCount:
description: |
Count of transactions that failed to complete tue to an error.
type: integer
format: int32
additionalProperties: false
TransactionTypeCounts:
description: |
Transction counts for different types of transaction.
type: object
properties:
transactionTypeCode:
description: |
Type code for the set of transaction counts.
$ref: "transaction.yaml#/TransactionTypeCodeEnum"
transactionCounts:
description: |
Set of transaction counts for the type.
$ref: "#/TransactionCounts"
additionalProperties: false
required:
- transactionTypeCode
TransactionTypeCountsCollection:
description: |
Collection of transaction counts tender per transaction type.
Each member of the collection represents metrics per type.
type: array
items:
$ref: "#/TransactionTypeCounts"
TradeMetrics:
description: |
A set of metrics associated with trade inside retail transaction.
type: object
properties:
tradeItemMetrics:
description: |
Amount and Quantity metrics for trade items.
$ref: "#/TradeItemMetrics"
tradeItemMetricsPerGroup:
description: |
Trade Item Metrics captured for different item groups.
$ref: "#/TradeItemGroupMetricsCollection"
discountAmountPerType:
description: |
Discounts for different discount types types.
$ref: "#/DiscountTypeAmountCollection"
taxAmountPerAuthorityRule:
description: |
Taxes for different types of tax rules.
$ref: "#/TaxAuthorityRuleAmountCollection"
tradeTenderMetrics:
description: |
Amount metrics for trade tenders.
$ref: "#/TradeTenderMetrics"
tradeTenderMetricsPerType:
description: |
Metrics captured for different tender types.
$ref: "#/TradeTenderTypeMetricsCollection"
additionalProperties: false
TradeItemMetrics:
description: |
A set of metrics associated with trade items.
type: object
properties:
grossSalesAmount:
description: |
Overall sales amount, unadjusted for discounts or returns
from customers. Gross Sales typically do not include taxsx when
taxes are not included in item prices. In case of VAT tax, where
taxes are blended with price, Gross Sales include tax amount as well.
$ref: "common.yaml#/MonetaryAmount"
netSalesAmount:
description: |
Gross Sales amount minus amount of discounts and sales returns.
Net Sales typically do not include taxex when taxes are not included
in item prices. In case of VAT tax, where taxes are blended with
price, Net Sales amount include tax amount.
$ref: "common.yaml#/MonetaryAmount"
returnsAmount:
description: |
Overall amount given back to customers due to sales returns of
the previously sold items. Gross Sales typically do not include taxex
when taxes are not included in item prices. In case of VAT tax, where
taxes are blended with price, Gross Sales include tax amount as well.
$ref: "common.yaml#/MonetaryAmount"
netTaxAmount:
description: |
Overall amount of taxes collected from customers for all tax authorities.
This amount is adjusted by taxes given back to customers as part
of sales returns (tax refund).
$ref: "common.yaml#/MonetaryAmount"
salesQuantity:
description: |
Overall sales quantity, unadjusted returns.
type: integer
format: int32
netSalesQuantity:
description: |
Gross Sales qunatity minus quantity of returns.
type: integer
format: int32
returnsQuantity:
description: |
Quantity of returns.
type: integer
format: int32
additionalProperties: false
TradeItemGroupMetrics:
description: |
Trade item metrics for different types of item groups.
type: object
properties:
merchandiseHierarchyNode:
description: |
Node of merchandise hierarcy used to scope amount and quantity metrics.
$ref: "transaction-item.yaml#/MerchandiseHierarchyNode"
itemGroup:
description: |
Item group used to scope amount and quantity metrics.
$ref: "transaction-item.yaml#/ItemGroup"
tradeItemMetrics:
description: |
Trade item metrics that correspond to the defined group
$ref: "#/TradeItemMetrics"
additionalProperties: false
TradeItemGroupMetricsCollection:
description: |
Collection of trade item mentrics per item group.
Each member of the collection represents metrics per group.
type: array
items:
$ref: "#/TradeItemGroupMetrics"
DiscountTypeAmount:
description: |
Discount amount for different types of discount.
type: object
properties:
discountType:
description: |
Discount type for which amount is captured.
type: string
discountReasonCode:
description: |
Discount reason for which amount is captured.
type: string
discountRuleID:
description: |
Discount rule ID for which metrics is captured.
type: string
discountAmount:
description: |
Amount of the discounts for that type.
$ref: "common.yaml#/MonetaryAmount"
additionalProperties: false
DiscountTypeAmountCollection:
description: |
Collection of discount amounts per type.
Each member of the collection represents discount amount per type.
type: array
items:
$ref: "#/DiscountTypeAmount"
TaxAuthorityRuleAmount:
description: |
Tax amount for different tax authorities/rules.
type: object
properties:
taxAuthorityID:
description: |
Identifier of tax authority collecting the tax.
type: string
taxRuleID:
description: |
Identifier of the rule used to calculate the tax.
type: string
taxRate:
description: |
Tax calculation rate if rule is rate-based.
type: string
taxAmount:
description: |
Amount of the tax for that taxAuthority/taxRule.
$ref: "common.yaml#/MonetaryAmount"
additionalProperties: false
TaxAuthorityRuleAmountCollection:
description: |
Collection of tax amounts per tax authrity/rule.
Each member of the collection represents tax amount per authority/rule.
type: array
items:
$ref: "#/TaxAuthorityRuleAmount"
TradeTenderMetrics:
description: |
A set of metrics associated with trade tenders.
type: object
properties:
tenderInAmount:
description: |
Tender amount received from customers.
$ref: "common.yaml#/MonetaryAmount"
tenderOutAmount:
description: |
Tender amount given to custmers.
$ref: "common.yaml#/MonetaryAmount"
netTenderAmount:
description: |
Total tender received minus tender given to customers.
$ref: "common.yaml#/MonetaryAmount"
additionalProperties: false
TradeTenderTypeMetrics:
description: |
Tender metrics for different types of tender.
type: object
properties:
tenderType:
description: |
Tender type for which metrics are captured.
type: string
tenderSubType:
description: |
Tender sub-type for which metrics are captured.
type: string
tenderID:
description: |
TenderID for which metrics are captured.
type: string
tradeTenderMetrics:
description: |
Trade tender metrics that correspond to the defined type
$ref: "#/TradeTenderMetrics"
additionalProperties: false
TradeTenderTypeMetricsCollection:
description: |
Collection of trade tender mentrics per tender type.
Each member of the collection represents metrics per type.
type: array
items:
$ref: "#/TradeTenderTypeMetrics"
CustomMetricGroup:
description: |
A group of related metrics.
type: object
properties:
groupName:
description: |
Name for the group of related metrics.
type: string
metrics:
description: |
Collection of custom metrics
$ref: "#/CustomMetricCollection"
additionalProperties: false
CustomMetricGroupCollection:
description: |
A collection of custom metrics groups.
type: array
items:
$ref: "#/CustomMetricGroup"
CustomMetric:
description: |
A custom metric defined by a retailer.
type: object
properties:
name:
description: |
Name for the custom metrics.
type: string
parameters:
description: |
Collection of parameters defining context for the metric.
$ref: "#/CustomMetricParameterCollection"
measure:
description: |
Quantitive value of the metric.
$ref: "#/CustomMetricMeasure"
additionalProperties: false
required:
- name
- parameters
CustomMetricMeasure:
description: |
Value for the custom metric. Initially we support amounts and
counts but in the future we can more properties to express
percentages (percent) and generic decimal values (decimalValue).
type: object
properties:
amount:
description: |
Monetary value of custom metric.
$ref: "common.yaml#/MonetaryAmount"
count:
description: |
Integer value of custom metric representing a count.
type: integer
format: int32
additionalProperties: false
CustomMetricParameter:
description: |
A key-value pairs to specify a parameter for custom metrics.
Such paremeters define context for the metric. For example, if
a metric shows amount of a certain tender, the parameter can
specify the tender ID.
type: object
properties:
name:
description: |
Parameter name.
type: string
value:
description: |
Parameter value.
type: string
additionalProperties: false
required:
- name
CustomMetricParameterCollection:
description: |
A collection of custom metric parameters.
type: array
items:
$ref: "#/CustomMetricParameter"
CustomMetricCollection:
description: |
A collection of custom metric .
type: array
items:
$ref: "#/CustomMetric"