-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathschema.xsd
1260 lines (1082 loc) · 64.7 KB
/
schema.xsd
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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1">
<xs:annotation>
<xs:documentation><![CDATA[
XML Schema for Klevu feed files. https://www.klevu.com
Please use a validator that supports the XML Schema 1.1 standard.
The Klevu schema is loosely based on Google's Product data specification,
with some modifications according to our own internal requirements:
https://support.google.com/merchants/answer/7052112
Google feeds include a g: namespace for many elements. To make your
life easier we allow you to either include or omit this g: prefix.
For Klevu, <id>123456</id> is identical to <g:id>123456</g:id>.
]]></xs:documentation>
</xs:annotation>
<xs:element name="rss">
<xs:complexType>
<xs:sequence>
<xs:element name="channel" type="ChannelType" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="version" type="xs:decimal" use="required" fixed="2.0"/>
</xs:complexType>
</xs:element>
<xs:complexType name="ChannelType">
<xs:sequence>
<xs:element name="title" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>The title of your store, for reference purposes only.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="200" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="link" type="UrlType" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>The URL to your store, for reference purposes only.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="meta" type="MetaType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Optional arbitrary information about this particular feed.
It's structure and contents are entirely up to you,
however it must contain valid XML elements.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="item" type="ItemType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Each item represents an entity in your data feed,
for example a Product, Category, CMS or Custom entity.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MetaType">
<xs:annotation>
<xs:documentation><![CDATA[
This section will not be validated or processed by Klevu.
It can be used for anything you like, in any format you like,
however it must contain valid XML elements.
For example, if your feed includes currency conversions you may include
information relating to the conversion rates used.
For example you might include a reference to the currency rate used,
or the various price differences you have for a particular product:
<meta>
<currencies>
<currency code="USD" rate="1.23" />
<currency>
<code>JPY</code>
<rate>123.45</rate>
</currency>
</currencies>
<prices>
<tax class="Default Tax Class" rate="20.00" />
<includingTax>123.45</includingTax>
<excludingTax>102.88</excludingTax>
<retailPrice>149.99</retailPrice>
</prices>
</meta>
]]></xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ItemType">
<xs:sequence>
<xs:element name="meta" type="MetaType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Optional arbitrary information about this particular item.
It's structure and contents are entirely up to you.
API Response Format: N/A
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="id" type="ItemIdType" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
This is your item's unique identifier.
See `ItemIdType` for detailed information about formatting.
API Response Format: id, itemId, itemGroupId
- id: "p54321-v54321" (deprecated)
- id: "v54321"
- itemId: "v54321"
- itemGroupId: "p54321"
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="item_group_id" type="ItemIdType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
This identifies the parent of your item for grouping.
See `ItemIdType` for detailed information about formatting.
For simple, non-compound items this element can be omitted.
For compound items, populate <item_group_id/> with the ID of the
parent item which ties all of the variant or child items together,
and populate <id/> with the ID of the variant or child item.
API Response Format: id, itemId, itemGroupId
- id: "p54321-v54321" (deprecated)
- id: "v54321"
- itemId: "v54321"
- itemGroupId: "p54321"
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="item_type" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
The type of the item. Klevu defaults are:
KLEVU_PRODUCT, KLEVU_CATEGORY, KLEVU_CMS.
You can also add your own item types, eg:
ACME_RECIPE, FOO_BAR, SOME_CUSTOM_ENTITY
If this element is omitted, Klevu will
populate with the default value KLEVU_PRODUCT.
API Response Format: typeOfRecord
- typeOfRecord: "KLEVU_PRODUCT"
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="sku" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
The Stock Keeping Unit (SKU) associated to the item.
This is required for Products, but optional for other item types.
API Response Format: sku
- sku: "ABC-123"
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="title" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
The name or title associated with the item.
The maximum length allowed is 150 characters.
API Response Format: name
- name: "Joust Duffle Bag"
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="150" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="link" type="UrlType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The URL to your item.
It must start with either http:// or https://
API Response Format: url
- url: "https://your.website/item-detail-page.html"
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="availability" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
The stock status of the item, if applicable.
Klevu will also populate the flag <inStock /> with "yes" or "no",
which is used in conjunction with your own settings of whether
you would like to show out of stock products or not.
API Response Format: inStock, availability
- inStock: "yes" or "no"
- availability: "In Stock" or "Out of Stock"
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[Ii]n [Ss]tock" />
<xs:pattern value="[Oo]ut of [Ss]tock" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="published_at" type="DateTimeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The date the item was created or published,
used for new arrivals ranking and sorting.
API Response Format:
- publishedAt: "1999-12-31T23:59:59+0100"
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="price" type="PriceType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The price of the item with the base currency.
When used in conjunction with sale_price, this will become the 'was price'.
For example: Was {price}, Now {sale_price}.
Please refer to `PriceType` for the correct formatting to use.
Note you should use the same base currency for all items in the feed.
If omitted, a default value of 0 will be used by Klevu.
API Response Format: price, currency, storeBaseCurrency
- price: "123.45"
- currency: "GBP"
- storeBaseCurrency: "GBP"
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="sale_price" type="PriceType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The sale price of the item with the base currency.
When used in conjunction with price, this will become the 'now price'.
For example: Was {price}, Now {sale_price}.
Please refer to `PriceType` for the correct formatting to use.
Note you should use the same base currency for all items in the feed.
If omitted, the value of <price /> will be used by Klevu.
For compound items, Klevu will automatically compare the lowest and
highest price and save those values against all variants as <startPrice/>
and <toPrice/>. This calculation does not consider stock status, so if the
highest and lowest price variants are OOS, their values are still used.
API Response Format: salePrice, currency, storeBaseCurrency
- salePrice: "100.00"
- startPrice: "50.00"
- toPrice: "200.00"
- currency: "GBP"
- storeBaseCurrency: "GBP"
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="additional_currencies" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The price and sale price of the item, converted to other currencies.
Values should be submitted in pairs. If you specify a <price/> you should
also specify a <sale_price/> and vice versa, to avoid unexpected behaviour.
If <price/> is omitted, the base currency value of <price/> will be used.
If <sale_price/> omitted, the <price /> in the same currency will be used.
API Response Format: price, salePrice, currency, storeBaseCurrency
- price: "151.66"
- salePrice: "122.92"
- currency: "USD"
- storeBaseCurrency: "GBP"
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="additional_currency" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="price" type="PriceType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="sale_price" type="PriceType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="image_link" type="UrlType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The main image of your item.
It must start with either http:// or https://
API Response Format: image
- image: "https://your.website/image1.jpg"
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="additional_image_link" type="UrlType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation><![CDATA[
The secondary image of your item.
It must start with either http:// or https://
API Response Format: imageHover
- imageHover: "https://your.website/image2.jpg"
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="swatch_label" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
The swatch label for this item.
This is the label that corresponds to the swatch image or colour.
For example: Red.
We support up to 20 swatches per compound item. If you provide swatch data
for 20+ records with the same <item_group_id/>, the swatch data from the
first 20 will be processed and the rest will be ignored. This allocation
does not take stock status into account, so even OOS items are included
in the swatch data associated to each sibling variant.
API Response Format: swatches
- swatches:
- - swatch:
- - - color: Red
- - - swatchImage: #ff0000
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="swatch_color" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
The swatch colour or image to be displayed for this item.
This is the colour that corresponds to the swatch label added.
For example: #ff0000 or red.
Alternatively for more complex swatches like multicolour or patterned,
you can provide the URL to a swatch image to be used.
For example: https://your.website/swatches/multicolour.png.
If providing a URL, please see `UrlType` for the URL definition.
API Response Format: swatches
- swatches:
- - swatch:
- - - color: Red
- - - swatchImage: #ff0000
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="2000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="rating" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
The rating of the item.
A decimal number between 0 and 5.
API Response Format: rating
- rating: 4.5
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="rating_count" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
The count of total number of ratings of the item.
An integer number.
API Response Format: ratingCount
- ratingCount: 10
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="boosting_score" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
Override the Klevu manual boosting rules.
A value of 1 - 999 indicates a boosting up the rankings.
A value of 0 - 0.9 indicates a de-boosting down the rankings.
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="999"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="short_description" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
The short description associated with the item.
Any HTML characters are stripped out and removed.
The maximum length allowed is 1000 characters.
Any additional characters after this will be truncated.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="1000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="description" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
The long description associated with the item.
Any HTML characters are stripped out and removed.
The maximum length allowed is 5000 characters.
Any additional characters after this will be truncated.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="5000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="keywords" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
Any keywords or tags associated with the item.
Any HTML characters are stripped out and removed.
The maximum length allowed is 1000 characters.
Any additional characters after this will be truncated.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="1000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="gtin" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The Global Trade Item Number (GTIN) of the item.
For example, 3234567890126
`SimpleAttributeType` will use the following values for this element:
- is_facet: false
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="mpn" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The Manufacturer Part Number (MPN) of the item.
For example, KL12345EVU
`SimpleAttributeType` will use the following values for this element:
- is_facet: false
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="brand" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The brand associated to the item.
For example, Nike or Adidas.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="color" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The Color of the item.
For example, Red.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="size" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The Size of the item.
For example, Large or 32.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="size_type" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Your clothing product's cut.
For example, Regular, Petite, Oversize or Maternity.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="age_group" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The demographic for which your product is intended.
For example, Newborn, Infant, Toddler, Child or Adult.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="gender" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The gender of your item.
For example, Male, Female or Unisex.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="material" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Your product's fabric or material.
For example, Leather.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="pattern" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Your product's pattern or graphic print.
For example, Striped.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="condition" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The condition of your item.
For example, New, Refurbished or Used.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="unit_pricing_measure" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The measure and dimension of your product as it is sold.
For example, 1.5 kg.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="energy_efficiency_class" type="SimpleAttributeType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Your product's energy label.
For example, A++, B or E.
`SimpleAttributeType` will use the following values for this element:
- is_facet: true
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="attributes" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Define additional attributes for your item,
which can include multiple values and also
specify whether to include as a facet.
See `ComplexAttributeType` for more information.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="attribute" type="ComplexAttributeType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="additional_data_to_return" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
Please note that this should be used with caution, as all data
provided will be returned with your item, thus increasing the data
size for search results. This can slow down your search experience.
This element is provided for you to add free format data which
will be returned in search results with your item. This can be
used for frontend logic or rendering.
IMPORTANT: Please reach out to support if you are submitting / planning
to submit the following field. This field is DISABLED by default.
The format of this data is up to you, as it will be returned
as-is, however any HTML should be escaped into HTML entities
as they would be stripped during the index process.
We recommend JSON as the best format to use, for example:
{"some_arbitrary": "data to return", "and_some_flag": true}
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="5000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="product_type" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
There are two ways to send item category associations to Klevu:
- <product_type/> (this method)
- <categories/> (recommended)
You must choose one or the other. You cannot mix and match.
If both are specified, only <categories/> will be processed.
<product_type/> uses the Google format, with each category
hierarchy separated by a > or > character. Each section of
each individual category hierarchy must be 100 characters or less.
For example, for <product_type>AAA > BBB > CCC</product_type>
you must ensure each of AAA, BBB and CCC are 100 characters or less.
You can specify multiple <product_type/> elements to represent
each category which the item belongs to.
The value after the last `>` in each <product_type/> is included as a
value for the category facet. The entire structure is used for Klevu Smart
Category Navigation. The category names must exactly match those used in your store.
API Response Format: category, klevu_category
- category: "Sneakers"
- klevu_category: "KLEVU_PRODUCT;;Mens;Shoes;Sneakers;;;@ku@kuCategory@ku@"
In this example, the product belongs to Mens > Shoes > Sneakers category.
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="750" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="categories" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
There are two ways to send item category associations to Klevu:
- <product_type/>
- <categories/> (this method, recommended)
You must choose one or the other. You cannot mix and match.
If both are specified, only <categories/> will be processed.
Each <category/> represents a single category,
with each <path/> representing a segment of the hierarchy.
The last path is used as the value for the category facet.
The entire structure is used for Klevu Smart Category Navigation.
The category names must exactly match those used in your store.
API Response Format: category, klevu_category
- category: "Sneakers"
- klevu_category: "KLEVU_PRODUCT;;Mens;Shoes;Sneakers;;;@ku@kuCategory@ku@"
In this example, the product belongs to Mens > Shoes > Sneakers category.
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="category" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="path" minOccurs="1" maxOccurs="unbounded">
<xs:simpleType>
<xs:annotation>
<xs:documentation><![CDATA[
An individual Category name that makes up part of the path
of the full Category Tree you are currently describing.
For example, for Men's / Shoes / Sneakers:
<category>
<path>Men's</path>
<path>Shoes</path>
<path>Sneakers</path>
</category>
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="groups" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
Groups give you an opportunity to show specific data to your
customers based on some search-time group value that you provide.
For example, if logged in customers belonging to a certain group
should see different prices to other customers, you can specify
those override values within a group.
Currently for each item we support:
- price & sale price (group-specific prices)
- visibility (whether the product should appear in results)
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="group" minOccurs="0" maxOccurs="50">
<xs:annotation>
<xs:documentation><![CDATA[
Klevu Groups have multiple uses, detailed below.
--
B2B Visibility:
Specify which groups of visitors should be able to view this
particular item, to allow for B2B functionality in your search.
All applicable groups must be specified for every item.
If you do not wish to use visibility functionality,
please omit this node entirely from your feed and
do not include `visibilityGroupID` param in searches.
--
Group Data Overrides:
Specific values which may differ on a per-group basis.
For example if a particular customer group should see different
versions of your item prices, you can specify those values here.
If you do not wish to use group override functionality,
please omit this node entirely from your feed and
do not include `priceFieldSuffix` param in searches.
--
The maximum number of groups you can specify,
for the entire store, is 50. If you specify more
than 50 groups you may see unexpected behaviour.
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="GroupIdType" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
An ID must be specified for every group in your
system which you may include as a search parameter.
This ID is used for visibility and overrides.
--
Visibility:
For example, take this search query:
/search?term=shoes & visibilityGroupID = group_3
The above search would only include items which have:
<group>
<id>group_3</id>
</group>
Any items without <id>group_3</id> specified would
be excluded by Klevu from the search results.
--
Data Overrides:
For example, take this search query:
/search?term=shoes & priceFieldSuffix = USD-group_3
The above search would display USD prices that
are specific to the group with ID: group_3
<group>
<id>group_3</id>
<sale_price>49.99 GBP</sale_price>
<additional_currencies>
<additional_currency>
<sale_price>61.74 USD</sale_price>
</additional_currency>
</additional_currencies>
</group>
In the above example, for group_3 the price
used in search results would be 61.74 USD
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The name of the group, currently only used for Magento legacy
implementations for customers wishing to use Group/Tier prices:
https://support.klevu.com/knowledgebase/magento-group-prices-and-catalog-price-rules/
Please refer to the following example for more information:
/examples/magento-backward-compatibility.xml
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="price" type="PriceType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The price of the item, specific to this particular group.
You need only include prices which differ from the base price.
If omitted, the base value of <price /> will be used for this group.
For example:
<item>
<price>200 GBP</price>
<sale_price>100 GBP</sale_price>
<groups>
<group>
<id>group_3</id>
<sale_price>300 GBP</sale_price>
</group>
</groups>
</item>
In this example, since <price/> is not specified for
group_3, the value will inherit from the base price,
ie. for group_3 price is 200 GBP and sale_price is 300 GBP
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="sale_price" type="PriceType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation><![CDATA[
The sale price of the item, specific to this particular group.
You need only include sale prices which differ from the base sale price.
If omitted, the base value of <sale_price /> will be used for this group.
For example:
<item>
<price>200 GBP</price>
<sale_price>100 GBP</sale_price>
<groups>
<group>
<id>group_3</id>
<price>400 GBP</price>
</group>
</groups>
</item>
In this example, since <sale_price/> is not specified for
group_3, the value will inherit from the base sale price,
ie. for group_3 price is 400 GBP and sale_price is 100 GBP
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="additional_currencies" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
<xs:annotation>
<xs:documentation><![CDATA[
The price and sale price of the item, converted to other currencies.
You need only include prices that differ from the base price for that
currency. If either <price/> or <sale_price/> are omitted, they will
inherit from the base version of that additional currency.
For example:
<item>
<price>200 GBP</price>
<sale_price>100 GBP</sale_price>
<additional_currencies>
<additional_currency>
<price>400 USD</price>
<sale_price>300 USD</sale_price>
</additional_currency>
</additional_currencies>
<groups>
<group>
<id>group_3</id>
<price>600 GBP</price>
<sale_price>500 GBP</sale_price>
<additional_currencies>
<additional_currency>
<sale_price>700 USD</sale_price>