// Iterate over each product definition and insert
for (HashMap<String, Object> productDefinition : productDefinitions) {
String productType = (String) productDefinition.get("type");
int productSet = (Integer) productDefinition.get("set");
String productSKU = (String) productDefinition.get("sku");
CatalogProductCreateEntity attributes = (CatalogProductCreateEntity) productDefinition.get("attributesRef");
// Get the product ID and the number of items we want to place in the shopping cart
int productId = createProduct(productType, productSet, productSKU, attributes);
double qtyToPurchase = (Double) productDefinition.get("qtyToPurchase");