Basket parameter explained

Overview

This article explains the basket parameter (bsknew) in the import URL used for automated validation of basket positions. For more information on how to validate basket positions, please read the section on basket validation in the article on bulk validation.

Working with the basket parameter

Basket string

The basket parameter contains at least one string. This string represents the basket position and contains all data related to the product a customer ordered. For the validation process, only the mandatory components mentioned in the table below are needed, the non-compulsory components are only relevant when you want to change the corresponding values during the validation process.

Element name

Explanation

Mandatory

Corresponding field in export file

Example

Element name

Explanation

Mandatory

Corresponding field in export file

Example

positionID

This number represents the position in the order of basket positions. In case a client ordered two different products, the first string will contain the value ‘1’ for this parameter, the second one ‘2’ and so on.

Yes

n/a

1

price

The price of the product that was ordered.

No

product_price

182.00

quantity

The number of examplars of the product ordered. This element should be adjusted in case of partial order cancelation.

No

product_quantity

1

commissionFix

The fixed commission applied to the basket position.

No

product_commission_fix

0

commissionPercent

The percentaged commission applied to the basket position.

No

product_commission_percent

2.5

categoryId

The ID of the tracking category applied to the basket position.

No

conversion_product_category_label

3682

productId

The ID of the product to which the basket position relates.

No

n/a

MA339HL84SEDLMX-893765

productNumber

The name of the product to which the basket position relates.

No

n/a

Green Hoover vacuum cleaner

status

The status of the basket position. Following values are possible: 0 (open), 1 (confirmed) and 2 (rejected). This element is used for the basket validation.

Yes

position_status

1

brandName

The name of the brand of the product in the basket position.

No

 

Hoover

productCategoryName

The name of the shop category of the product in the basket position.

No

 

Household appliance

Showing 1 to 12 of 12 entries

PreviousNext

Following the example values in the table, the string would look like this:

[{ "price": "182", "quantity": "0", "commissionFix": "0", "commissionPercent": "11", "categoryId": "3682", "productId": "MA339HL84SEDLMX-893765", "productNumber": "Green Hoover vacuum cleaner", "positionId": "1", "status": "1", "discountValue": "20.00", "brandName": "Hoover", "productCategoryName": "Household appliance" }]

Multiple strings

As was mentioned above, every string represents one basket position. This means that when a customer ordered different articles, the basket parameter will contain multiple strings.

Strings needed to be separated by commas. Using the string from the example above and adding another one, the parameter value for the basket parameter would look like this:

[{ "price": "182.00", "quantity": "1", "commissionFix": "0", "commissionPercent": "11", "categoryId": "3682", "productId": "MA339HL84SEDLMX-893765", "productNumber": "Green Hoover vacuum cleaner", "positionId": "1", "status": "1", "discountValue": "20.00", "brandName": "Hoover", "productCategoryName": "Household appliance" }, { "price": "20.00", "quantity": "4", "commissionFix": "0", "commissionPercent": "5", "categoryId": "8245", "productId": "BC442CL87FPDSUc-569284", "productNumber": "Teaser cleaning cloths", "positionId": "2", "status": "1", "discountValue": "0.00", "brandName": "Teaser", "productCategoryName": "Household appliance" }]

Adding new basket positions

During the validation process, you can add a new basket position, simply by adding a new string to the basket parameter. To create this new string, just follow the instructions mentioned above. Please make sure you use ‘0’ as a value for the position ID, to make sure you do not unsettle the order of the basket positions.

How to integrate the string in the import URL

To integrate the basket position in your export URL in order to make sure the order cancelation is automatically transmitted, the basket position needs to be URL encoded in JSON format. Following the example of the two basket positions above, the basket position would look like this:

%5B%7B%22price%22%3A%22182.00%22%2C%22quantity%22%3A%221%22%2C%22commissionFix%22%3A%220%22%2C%22commissionPercent%22%3A%2211%22%2C%22categoryId%22%3A%223682%22%2C%20%22productId%22%3A%22MA339HL84SEDLMX-893765%22%2C%22productNumber%22%3A%22Green%20Hoover%20vacuum%20cleaner%22%2C%22positionId%22%3A%221%22%2C%22status%22%3A%221%22%7D%2C%7B%22price%22%3A%2220.00%22%2C%22quantity%22%3A%224%22%2C%22commissionFix%22%3A%0A%220%22%2C%22commissionPercent%22%3A%225%22%2C%22categoryId%22%3A%228245%22%2C%22productId%22%3A%22BC442CL87FPDSUc-569284%22%2C%22productNumber%22%3A%22Teaser%20cleaning%20cloths%22%2C%22positionId%22%3A%222%22%2C%22status%22%3A%221%22%7D%5D

As soon as you have encoded your basket position, it can be used as value for the new basket parameter, which is described in the article on automated validation.