Set the basket total on a customer session object.
set_session_basket_total
Params
Response
Whether or not the session operation was successful.
A failure message in the event of failure.
items
Basket Item Array
required
An array of session basket items
The SKU of the basket item
An optional quantity of this item in the basket
import * as sdk from "k42-sdk"
const session = sdk.createSession("session-ref");
if (!session.success) {
console.log(`Failed to create session - ${session.message}`)
return;
}
let updateResult = sdk.setSessionBasketTotal(1000);
if (!updateResult.success) {
console.log(`Failed to update session - ${updateResult.message}`)
return;
}