Understanding cart_id (user event)

215 views
Skip to first unread message

Meniar Laatiri

unread,
Apr 2, 2021, 9:29:17 AM4/2/21
to cloud-recommendations-users
Hello,

According to the recommendation AI documentation, the cart-id is the id or name of the multiple items added or present in the cart before purchase.
I didn't get the use of this field. Can you please give me an example to understand it more!  
What are the possible values?
I also want to know if I can value them according to the ongets of the website?
for example (mobile, accessory, Tablet ...)

Regards,

Meniar

Meniar Laatiri

unread,
Apr 2, 2021, 9:45:51 AM4/2/21
to cloud-recommendations-users
In the case of several categories of products added to the cart, Can I have a String  in this  format : "mobile| accessory"   separated by "|" or ";" ???

Mauli Patel

unread,
Apr 2, 2021, 11:08:24 AM4/2/21
to cloud-recommendations-users
Hi Meniar,

I am working on Recommendations AI too. You can not define the categories separated by "|" or ";" ???. Categories can only be defined in arrays. You can also define several categories in one array. 

Example:- "category_hierarchies":[{"categories":["home appliances","bedroom"]}]

Thanks,
Mauli

Mauli Patel

unread,
Apr 2, 2021, 11:11:18 AM4/2/21
to cloud-recommendations-users
Hi Meniar,

The cart id is the same as the product id. If you won't define the Catalog id in the database then after importing the database into the catalog it will automatically generate the catalog id and Item group id as same as Product id. 

Meniar Laatiri

unread,
Apr 2, 2021, 11:16:29 AM4/2/21
to cloud-recommendations-users
Hi Mauli,

Sorry but I am asking about the "cart-id" field which is the id or name of the multiple items added or present in the cart before purchase. 
This field is in the add-to-cart eventType (import user event ).

safa mabrouk

unread,
Apr 2, 2021, 12:41:33 PM4/2/21
to cloud-recommendations-users

Hello :)

'The cart id is the same as the product id. If you won't define the Catalog id in the database then after importing the database into the catalog it will automatically generate the catalog id and Item group id as same as Product id. '

I think that Meniar does not talk about the import of catalog , but the import of user event  and specially teh event 'shopping-cart-view'. If w're gonna  map the product-id with the filed card-id  for the event shopping-cart   , what would we do if we have many products in the shopping cart  ? 

and for Meniar's last comment ,I was also  wondering if  cart-id  is some used to categorize the shooping cart . For exemple , if we have mobiles  devices in the shopping cart , what  could the value of the filed cart-id be ?  carte-id="mobile" for exemple ?  ,or if the shopping cart contains some accessories , what may the value of cart-id be ?  cart-id='accessories ' ?  . Now  in the case of shopping cart that contains 2 type of products , what value should the cart-id field  be ? 

Eric Larson

unread,
Apr 2, 2021, 1:07:29 PM4/2/21
to safa mabrouk, cloud-recommendations-users
The cartId is not the same as the productid.

Optional. The id or name of the associated shopping cart. This id is used to associate multiple items added or present in the cart before purchase.
This can only be set for add-to-cart, remove-from-cart, checkout-start, purchase-complete, or shopping-cart-page-view events.

If you have a unique identifier to identify the current cart then you can send it.  If not, don't worry about it.  It's an optional field.
If we have the add-to-cart events we know what's in the cart, and if we have the purchases we know which of those items were purchased.

In some implementations stores may have different carts, for sub-stores for example, so this could be used to differentiate between them.



--
You received this message because you are subscribed to the Google Groups "cloud-recommendations-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-recommendatio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-recommendations-users/6044b6ff-1301-4337-8a93-13a8a2dcb377n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages