Use the example SDK code in this topic to add an already configured item to a cart.
```javascript
const addToCartInput = digitalCommerce.createAddToCartInput();
addToCartInput.catalogCode = "Phones";
addToCartInput.offerConfiguration = digitalCommerce.getSelectedOffer(offerCode);
addToCartInput.customFields = ["customAttribute__c"]; // optional field which returns custom fields for given keys
input.basketAction = "AddAfterConfig";
return digitalCommerce.addToCart(addToCartInput);
})
.then(addToCartResponse => {
Logger.info(addToCartResponse.orderId);
})
.catch(error => {
Logger.info("addToCart login user dual fail: " + error);
});