uStore API Order Submit Steps

452 views
Skip to first unread message

Ragav

unread,
Dec 13, 2017, 6:22:25 AM12/13/17
to XMPie Interest Group
Hi 

I'm kind fo new to uStore. Could anyone give me a steps to create and submit an order.

Like for UProduce we have to follow the below steps to create an order (roughtly)

1. Create new ticket
2. Create new receipent table
3. Set RI for ticket
4. submit job.



We have products and other details configured on the uSote. I just dont know how to submit order. 
I roughly understands I have to create orderid then cartid then orderproductid then submit order.

Could anyone please provide me a detiles steps with methods name to create and submit an order in uStore.


Thanks in advance,
Ragav

couch

unread,
Dec 13, 2017, 6:25:39 PM12/13/17
to XMPie Interest Group
AFAIK, uStore is designed for a customer to place an order.
Automatically placing an order programatically seems an odd thing to do, and i don't think there are API methods to do that.

guillaumebesnie...@gmail.com

unread,
Dec 14, 2017, 3:56:56 AM12/14/17
to XMPie Interest Group
Hello Steve,

I thought that the uStore 8.4.1 API introduced two new methods in the OrderProduct class: AddOrderProductToCart and CreateOrderProduct respectively.
Despite I did not take the time to test, I assume it should be enough to place static products (as mentioned in the "What's New" chapter of the CHM file, anyway).
I'm less certain for dynamic products, etc, thoug... :-|

Bill

Jill Scott

unread,
Dec 3, 2018, 7:03:52 PM12/3/18
to XMPie Interest Group
I'm working on a similar setup, and running into some questions. Our client is trying to integrate their external system (Salesforce) with our uStore, and we're using the API WS methods to try to accomplish this. Client would like to be able to "press a button" in their system to automatically send their order into our system and submit the order to production. Currently, our process looks like this:
  1. OrderWS > GetUserCartId (input is Store ID and User ID) *Cart ID is the same as Order ID
  2. OrderProductWS > CreateOrderProduct (input is Product ID and Order ID)
  3. OrderProductWS > AddQuantityOfOrderProductToCart (input is Order ID, Order Product ID and Quantity)
  4. OrderWS > SubmitOrder (input is Order ID)
However, I'm realizing that, between steps 3 and 4, we need to also pass in Delivery Service, Delivery Address, and Clearing Info (in this case, Purchase Order). The only possibly helpful API methods I've found is OrderProductWS > SetDelivery (which sets the Delivery Method and Delivery Service ID).

Does anyone know if this is possible using just the API WS methods? If so, what am I missing?

Thanks,
Jill

couch

unread,
Dec 3, 2018, 7:51:09 PM12/3/18
to XMPie Interest Group
AFAIK, the uStore WS API is not designed to programatically add orders. - You can only get product properties and customization dial values - not set them. Like you found, there are no methods for setting delivery.

The way I have seen uStore integrated into other systems, is to create your store as a "uStore Connect" store type, and to load the uStore URL into an iframe or pop-up windows in the custom application.

There is a uStore connect sample provided with the uStore API SDK.

Also, remember, that to use the uStore APIs legally, requires payment of an an extra licensing fee to XMPie that may or may not have been purchased for your system.

Jill Scott

unread,
Dec 4, 2018, 10:18:41 AM12/4/18
to XMPie Interest Group
Thanks for your feedback, couch! I'll take a look at the uStore Connect sample and see if that will work for our client.

Thanks,
Jill

Igor

unread,
Dec 4, 2018, 10:34:05 AM12/4/18
to XMPie Interest Group
As Steve Couch mention submission orders to uStore via API without redirecting user to store is very limited.
Yes it is possible to add Static items to the cart and submit orders and a new API were introduced in latest patch that can allow do some additional stuff , but as Steve stand there is no API that allow update properties or dial values. if your solution can Utilize recipient list you can use a reorder workflow ...and update list after reorder but you need at least one item placed vie UI ...
Hence we recommend uStore connect workflow or SSO . BTW Salesforce supports SAML and XMPie professional services can help to connect SF via SAML SSO workflow .
Here some new API that were released as a new patch for 9.4

  • UpdateBillingAddress (orderID, billingAddressID)
    Updates the billing address of the given order.
  • UpdateClearing (orderID, paymentMethodID, clearingResult)
    Updates the clearing info of the given order, after payment, prior to order submission, supplying the clearing method and its result xml. If using an existing clearing method, the xml should be formatted correctly for this specific clearing.
  • UpdateDelivery (orderID, shippingAddressID, shippingDeliveryServiceID)
    Updates the delivery info of the given order, prior to order submission, with an existing shipping address (created by another WS call) and the selected delivery service. Note that this method does not support split shipping for items that require an automatic split (by different manufacturers or different property values which affect split shipping). 
    If the order has mailing items only, this WS still needs to be called by passing zero (0) value to the parameters shippingAddressID and shippingDeliveryServiceID
  • SubmitOrderWithClearingAndDelivery (orderID)
    Submits the given order, assuming that clearing results and delivery info are already set in the order.

Jill Scott

unread,
Dec 4, 2018, 10:54:37 AM12/4/18
to XMPie Interest Group
Hi Igor,

Thanks for this valuable info! We only need to submit orders with Static products (default values for all Product Properties). Does that mean we should be able to use just WS calls to accomplish this? 

I tried accessing the new API methods that you listed, but I'm getting a message that says "Method 'SubmitOrderWithClearingAndDelivery' was not found in service OrderWS." See screenshot below. Do I need to do something different to access these new methods?

Screen Shot 2018-12-04 at 8.47.29 AM.png


Thanks for your help with this!

Jill

Igor

unread,
Dec 4, 2018, 11:17:51 AM12/4/18
to XMPie Interest Group
You need to be on the uStore 9.4 and have lates patches installed.
Also you in particular on a special system configuration that may have some API restrictions.
I suggest you contact us directly.
Igor.

Igor

unread,
Dec 4, 2018, 11:53:54 AM12/4/18
to XMPie Interest Group
You can check your system now I think we just run a patches and new API should be avaiable  

Jill

unread,
Dec 4, 2018, 12:00:56 PM12/4/18
to XMPie Interest Group
I just checked, and everything is there now! Thank you! :)

Jill

Jill

unread,
Dec 18, 2018, 12:44:26 PM12/18/18
to XMPie Interest Group
I've run into an error with one of the new API web service methods, and I'm not sure what to do to fix it...

We're using the OrderWS method "UpdateDelivery", and we're getting the following error: 8: The operation has failed. Object cannot be cast from DBNull to other types.

The HTTP GET method we're using is:


Any ideas?


Jill

Igor Vorobeychik

unread,
Dec 18, 2018, 5:58:25 PM12/18/18
to xmpie...@googlegroups.com
is order in the cart or not? do you have such address id ?  is this address belong to a user? do you have this service configured and used in the store?

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at https://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/d/optout.

Jill

unread,
Dec 18, 2018, 6:21:19 PM12/18/18
to XMPie Interest Group
Yes, I've double-checked that this order is currently in the cart, the address exists and belongs to the current user, and the shipping delivery service is configured and active in this store. Any ideas of what else it could be?

Thanks,
Jill

Igor Vorobeychik

unread,
Dec 18, 2018, 6:32:25 PM12/18/18
to xmpie...@googlegroups.com
what about products in the order ? how they configured in terms of shipping, if you place it manually will you be able select such service ...

--

Jill

unread,
Dec 19, 2018, 10:52:50 AM12/19/18
to XMPie Interest Group
That was the issue - at least one of the products in the order had a different shipping service set. Once we corrected that, it's working perfectly!

Thank you, Igor!


Jill

Jill

unread,
Jan 18, 2019, 11:00:38 AM1/18/19
to XMPie Interest Group
Is there a Rollback or "undo" method in the uStore API? We're encountering an issue where, when a step fails and the process needs to start over, the previous steps (such as creating a new order product) have already been sent to the API and saved, so we end up with duplicate order products. 

Appreciate any help on this!

Jill
Reply all
Reply to author
Forward
0 new messages