Predictive Basket

Returning customers are an asset for every online shop. Especially if they show regular buying behaviour. The Predictive Basket recognises these patterns and makes suggestions to customers about which purchases they will make again in the near future.


The technical documentation of the REST API is included in the search application itself and can be accessed via the following URL:

Swagger Link

On this interface, in addition to the parameter documentation, you also get the option to test a query and view the result of it. Since the documentation was created with Swagger, you can generate a client for it with Swagger Codegen and use it in your code.

The recommendations of the predictive basket are retrieved via the Swagger call swagger-ui.html#/predbasket/getPredictionsUsingGET. There is no special import as with the Recommendation Engine.

Supplying the Predictive Basket with data

In order to set up the Predictive Basket with your product information, we need the sales data in an orderly structure. A CSV text file is a suitable format.

By following the recommendations below, it is possible to import the export file into the Predictive Basket without major adjustments. This minimises project costs. If you are not able to create this structure, we can most likely still use your differently structured data by creating an import routine - just contact us.

Please pay attention to the following points during the creation:

  • Create the export file in CSV text format (fields separated with a delimiter such as semicolon or [tab]).
  • If possible, create the text file in the UTF-8 character set. If you decide to use a different character set, you must let us know.
  • Create a new line per purchased product (record).
  • Each line must contain the same number of fields.
  • Make absolutely sure that none of the separators used appear in the order data itself. Otherwise, the field structure will be interpreted incorrectly during import, the field contents will get mixed up and the corresponding record cannot be imported.
  • No column separator may appear at the beginning or end of each line, unless the first or last field is present but empty in some records. If a middle field is to remain empty, the separator must still be written. (Example: content1;content2;;content4; - five fields, field three and five are empty).
  • The first line of the CSV file must contain the field names. The structure is identical to the data lines (see example below).

Example structure without field limiters

Bestellnummer;Verkaufsdatum;Kundennummer;Produktnummer;Menge;Preis

02101;2020-04-02T15:20+01:00;0023928;23899823;1;699.00

02102;2020-04-02T15:20+01:00;0034228;23892326;2;199.00

02103;2020-04-02T15:20+01:00;0123421;23899854;1;849.00

...

Example structure with field limiters

"Bestellnummer";"Verkaufsdatum";"Kundennummer";"Produktnummer";"Menge";"Preis"

"02101";"2020-04-02T15:20+01:00";"0023928";"23899823";"1";"699.00"

"02102";"2020-04-02T15:20+01:00";"0034228";"23892326";"2";"199.00"

"02103";"2020-04-02T15:20+01:00";"0123421";"23899854";"1";"849.00"

...

Additional information


The following information must be provided so that a complete result can be presented later. Fields marked with an asterisk (*) are required fields.

The field names given are to be understood as recommendations. The naming is not case-sensitive. By following the recommendations, it is possible to import the export file into the predictive basket without major adjustments. This minimises project costs.

  • Order number*
    This information is important in order to be able to clearly allocate the records. The order number field should be the first field in your export.
  • Sales Date*
    The sales date is required as a timestamp according to ISO 8601. Alternatively, you can supply the date in the format YYYYmmdd.
  • Customer number*
    Please provide a customer ID here, this can be anonymised. However, the customer ID must remain the same across sessions.
  • Product number*
  • Unique ID of the product that was purchased.
  • Quantity*
  • Purchased quantity of the product as an integer.
  • Price

          The applicable price for the product. The field should not contain currency symbols and should use the same decimal separator throughout. The decimal point must be the full stop, not the comma. There must be no thousands separator. Example: 99