The rules for working with someone elses shopping cart:
- For a Customer: They can access any cart for contacts within their sales organization, as long as they haven't been blacklisted by the contact (preferences allow you to stop contact(s) from looking at your work). They CANNOT look at a c/e persons un-named cart (where cart name = billto customer#)
- For CE: They can access any cart for contacts within the sales organization, as long as the contact they are working on behalf of hasn't been blacklisted by that contact. They can also work on their own named and un-named carts. As long as they are CE (have an operator code), they will have access to all ce-specific screens/fields (ie, ce cart drawer, price overrides, etc) regardless of whose cart they are in.
New Rules for READ, SAVE, and GETBYFILTER/GETBYID processes:
- Named param OWNER.ID will be available everywhere. This will be set to the contact who owns the cart (whose contact# is in the CART.NAME key)
- All READ/SAVE/FILTER programs will use OWNER.ID instead of CONTACT.NBR when reading or saving the cart record
- When saving cart that CE is working on:
- If this is a named cart (CART.NAME # BILLTO.NBR), DO NOT write the shoppingcart.usr record with an OPERATOR suffix. This way it will be accessible to anyone, including the customer or another ce rep.
- If un-named cart (CART.NAME = BILLTO.NBR), continue to write with the OPERATOR suffix. This is the ce rep's personal unfinished cart that no-one else should be able to access.
- When reading a cart that CE is trying to access:
- If this is an un-named cart, read shoppingcart.usr with the OPERATOR suffix
- If this is a named cart, read without OPERATOR suffix
- If not CE, always read without OPERATOR suffix
The following programs require changes (timeline 38-2):
- RPC$SHOPPINGCART_SAVE - use OWNER.ID for KEY instead of CONTACT.NBR, If CART.NAME <> BILLTO.NBR do not save OPERATOR as part of key.
- RPC$SHOPPINGCART_GETBYFILTER – use OWNER.ID for SEL statement instead of CONTACT.NBR
- RPC$SHOPPINGCART.READ – If FIELD(KEY, “*”, 2) = BILLTO.NBR then do nothing, Else, change Key to 2 part key.
- RPC$SHOPPINGCARTITEM.READ – If FIELD(KEY, “*”, 2) = BILLTO.NBR then do nothing, Else, change Key to 2 part key.
- RPC$SHOPPINGCARTITEM_GETBYFILTER – use OWNER.ID for SEL statement instead of CONTACT.NBR
- RPC$SHOPPINGCARTITEM_GETBYFILTER – IF CART.NAME = BILLTO.NBR ADD OPERATOR to select statement if it is there.
- RPC$SHOPPINGCARTITEM_GETBYID
- RPC$SHOPPINGCARTITEM_SAVE
- RPC$SHOPPINGCART_CHECKOUTENABLED
- RPC$SHOPPINGCART_CREATEORDER
- RPC$SHOPPINGCART_GETBYID
- RPC$SHOPPINGCART_GETORDERVALUE
- RPC$SHOPPINGCART_VALIDATECHECKOUTSTEP
- RPC$MODITEM_VALIDATETOCART
- RPC$SHAREDCART_GETBYFILTER
- RPC$SHAREDCART_SAVE
- RPC$SHIPMENTBUNDLING_GETBYFILTER (and JA.SHIPMENTBUNDLING)
- RPC$SHOPPINGCARTITEM_DELETE
- BP DATE.SHOPPINGCART
- BP FCT.CART.MODVALUE
- BP FCT.CART.PRICES
- BP FCT.CART.STOCKVALUE
- BP WEB.CREATE.CUSTOMER
- BP WEB.LK
UI Side:
- Make sure that OWNER.ID is available to all cart-related programs .... this is the owner of the cart (contact.nbr remains the person that is logged in)
- Allow activating someone else’s cart. Today we get a message stating “you are not the owner of this cart” and it does nothing else.