CreateOrderException more details #425
Replies: 7 comments
-
createOrder method throws an APIException with type 'CreateOrderException' if any of the following conditions are encountered:
|
Beta Was this translation helpful? Give feedback.
-
Also take a look if all your totals are available. It may looks fine in debugger as the value is 0, but being not available as a price due to invalid currency etc. |
Beta Was this translation helpful? Give feedback.
-
Guys, I know why it can happen, I also can read the official documentation :), but I want to put a bit more details in error log, not just "this Order can not be created". |
Beta Was this translation helpful? Give feedback.
-
Hi Ivan,
I am not with laptop, could not check but see
CreateOrderException class inherits the APIException class, which has the
properties which does exactly what you are looking for.
Please check and let us know if it works for yoy
…On Fri, Jul 5, 2019, 4:40 PM Ivan Melnyk ***@***.***> wrote:
guys, I know why it can happen, I'm asking about how to get more details
in code, so I will put more understandable logging in error logs than just
"this Order can not be created".
createOrder method throws an APIException with type 'CreateOrderException'
if any of the following conditions are encountered:
any of the totals (net, gross, tax) of the basket is N/A
any of the product items is not available (this takes previously reserved
items into account)
any campaign-based coupon in the basket is invalid (see
CouponLineItem.isValid()
the basket represents an order being edited, but the order has been
already been replaced by another order
the basket represents an order being edited, but the customer associated
with the original order is not the same as the current customer
Also take a look if all your totals are available. It may looks fine in
debugger as the value is 0, but being not available as a price due to
invalid currency etc.
Guys, I know why it can happen, I also can read the official documentation
:), but I want to put a bit more details in error log, not just "this Order
can not be created".
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/75/comments/3?email_source=notifications&email_token=AKECNZPZTV3RJTMMV2QMCDDP54OUHA5CNFSM4H6JBY62YY3PNVWWK3TUL52HS4DFWNCGS43DOVZXG2LPNZIG643UKJSXA3DZVJRW63LNMVXHIX3JMTHAAAQDII>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKECNZJH3D7KLIQ3BHUZ4M3P54OUHANCNFSM4H6JBY6Q>
.
|
Beta Was this translation helpful? Give feedback.
-
Hi Pravngaur, APIException does not provide anything extra than in dw.order.CreateOrderException. |
Beta Was this translation helpful? Give feedback.
-
Hi Ivan, We recently faced this issue and while investigating,the basket object was not created. We checked the taxation type that has to be included in invoice and then the shipping method.After correcting these two we were able to create a successful order. Not sure if this will be useful for you we faced same exception and we were able to correct these. |
Beta Was this translation helpful? Give feedback.
-
Once again, guys, I'm not asking about the reason of this error, I'm asking about how to get more details from SFCC API objects/classes. |
Beta Was this translation helpful? Give feedback.
-
Hello All,
Does anyone of you know how to get more info about APIException type 'CreateOrderException' in case if OrderMgr.createOrder(Basket) did not work? I can see only 'dw.order.CreateOrderException: Order creation not possible for this basket.', is there any way how to get exact error (i.e. Inventory, Taxation, N/A price in Basket, Order replacement, etc.)?
Thanks,
Ivan.
Beta Was this translation helpful? Give feedback.
All reactions