Saturday, October 6, 2012

Oracle iStore - Copy Sales Order to User Cart

In Oracle OTN forum, one user has posted the below interesting requirement on Oracle iStore module.

How to copy a Sales Order to a Shopping cart?

The user was expecting something like copy cart feature provided by Oracle iStore. Because the Sales order has configured item that user is planning to order in different times and they are not ready to use shopping list feature as they are not sure for which sales order they are going to repeat the order.

So below were my suggestion to the user for customization,

User have Sales Order number with him. Through Sales order, the corresponding Quote Number/Quote Header Id can be obtained.

ASO_QUOTE_HEADERS_ALL.QUOTE_HEADER_ID is nothing but OE_ORDER_HEADERS_ALL.SOURCE_DOCUMENT_ID.


We have oracle provided API to copy quote ASP_QUOTE_PUB.COPY_QUOTE. This API can be used to create a new quote from the existing quote.

So the new quote/cart is created for the user, but the quote/cart is getting saved in to the saved cart and not becoming the active cart.

For a user, to get a active cart there should be a row in the table IBE_ACTIVE_QUOTES_ALL table with reference to the particular quote_header_id in the table ASO_QUOTE_HEADERS_ALL.


IBE_ACTIVE_QUOTES_ALL is used to store the current active cart of a user. 
The user is identified by party_id and cust_account_id referring HZ_PARTIES and the active cart is identified by the quote_header_id referring ASO_QUOTE_HEADERS_ALL. This is an org striped table. Primary key is a combination of party_id, cust_account_id and org_id 

So suggested the user to insert a record in the IBE_ACTIVE_QUOTES_ALL table with reference to the quote created through the ASO api. Once this is done, User was able to see the created cart as active cart in the customer UI.

I will soon share the full API 

Here is the link the forum thread  

2 comments:

  1. Hi, Thank you for the post. How do we copy an order created in order management to user cart? There will not be any SOURCE_DOCUMENT_ID for such orders. Is there any seeded api for that?

    ReplyDelete
  2. Hi,

    We had a requirement to copy the orders created from OM to iStore shopping cart.There will not be source_document_id for these orders as these orders will be created from order management.As these orders will be visible in order tracker in iStore user is expecting to copy these order lines to iStore Active Shopping Cart.We are using ATO/PTO configured items in our implementation.Kindly help if istore can use any standard API'S to achieve this copy functionality.

    ReplyDelete