cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Return ERP Sales Order ID to SAP CPQ Sales Quote

abreuleandro
Participant
3,236

Hello Experts,

I am struggling to return the Sales Order ID generated after Posting it from SAP CPQ Sales Quote, to a custom field designated to show it.

I have already a custom field, ExternalID, ready to show the BELN that comes from the returned IDOC mapped to this field, but when the integration ends, SOAP xml gives me the error below:

<performCartActionResponse xmlns="http://webcominc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><performCartActionResult><RESULT xmlns=""><RESULT>NOK</RESULT><REASON>Action Order Status Update is not allowed</REASON><STATUS>Order Placed</STATUS></RESULT></performCartActionResult></performCartActionResponse>

The main problem is, I don't have the action 'Order Status Update' for the 'Order Placed' status on the Workflow tab from the Setup on CPQ.

I do have this action, though, for the 'Order Confirmation Pending' status, which is the next status from the Workflow table I have here.

s there a way around this? Can I make this action available and active after this, for the 'Order Placed' status of the CPQ Quote?

I thank you in advance. I appreciate any help.

Regards,

Leandro

Accepted Solutions (1)

Accepted Solutions (1)

Nikhil_Walsetwar
Contributor

Hi Leandro,

You have to enable this action in other quotes tab under workflows. Then it will solve your issue.


BR,

Nikhil

abreuleandro
Participant
0 Likes

Thanks a lot for your answer, wnikhil!

This resolves the issue, along with the proper adjustment on the Workflow Permissions for the communication user type.

Best Regards,

Leandro

abreuleandro
Participant
0 Likes

wnikhil, although the artifact has completed successfully, I am not able to see the OrderID back on the CPQ Quote. Do you have any tips for me to get it replicated to a custom field? The SOAP api doesn't allow me to map it directly, and even throwing through the comments section of the xml, I can't see anything on the sales quote cart's comment section.

Regards, Leandro

Nikhil_Walsetwar
Contributor

Hi Leandro,

Based on my findings as a standard solution the sales order id will get updated in 'Sales Order ID' field under Quotation tab.

Could you please check there? Also a checkpoint would be to see if the quote status is getting changed to 'Order Placed' or not.

BR,

Nikhil

abreuleandro
Participant
0 Likes

Hi Nikhil, yes, I checked this field, but even with the status 'Order Placed' set, the 'Sales Order ID' field is empty. The payload trace shows that the ID has been brought, but I can't see it. Obs.: I cleared some of the values that contains Project / Client's sensitive information.

Answers (2)

Answers (2)

abreuleandro
Participant
0 Likes

Hi wnikhil,

I did the trace by following the steps you said, but the trace returned an error.

2020-04-10 13:38:38.070 (7 ms) Script Execution - Debug run
2020-04-10 13:38:38.070    Error in script execution: Debug run   

The quote I opened in another tab has too the status 'Order Placed':

PS.: The same error on the script returned when opening the Quote 627 I sent earlier as an example.

I did a new trace now, and was able to return a success message, although the OrderID was not returned.

2020-04-14 12:33:36.290 Script Execution - Debug run

2020-04-14 12:33:36.290    136

2020-04-14 12:33:36.290    2

2020-04-14 12:33:36.290

Kindle note these new screens attached:

I really doesn't get it why the QuoteID shown is 136, once I opened the Quote #627 in another tab; anyhow, I apprecciate any other suggestion from you.

Regards,

Leandro.

Nikhil_Walsetwar
Contributor

Hi Leandro,

Are you opening multple quotes in diff tabs within a single browser instance? (like multiple quotes in diff tabs in chrome?)

And if you want to see the quote id, then the correct field is cart composite no and not quote ID.

Also, could you please retry the complete end to end flow? and provide your observations?

BR,

Nikhil

abreuleandro
Participant

Hi wnikhil,

Yes, I realized that the Quote ID shown is an internal ID. I wasn't opening multiple quotes that time, and the issue still persists. I have opened an incident to SAP Support, then.

Depending on their analysis, I come back with a feedback.

Best regards,

Leandro.

Nikhil_Walsetwar
Contributor
0 Likes

Hi Leandro,

Did you get the root cause of this issue from SAP support? if yes, could you please post it here as well, it'll be benefitial for the community.

BR,

Nikhil

abreuleandro
Participant
0 Likes

Hi Nikhil, no. Altough SAP Support did not respond with a resolution, I found out this issue was related to a xslt layout defined on User type. I changed it to the NewQuote.xslt and it shows the Order ID, as it should. The one that was not showing is the Reseller_wout_cost_n_margin-Discounts.xslt. Go figure!

Best regards,

Leandro.

Nikhil_Walsetwar
Contributor
0 Likes

Hi leandro.abreu

Did you add any script to modify the order id in SAP CPQ? If yes, could you please just comment it and retry?

Thanks,

Nikhil


abreuleandro
Participant
0 Likes

Hello wnikhil, no. In fact, I don't even know where to do it. This artifact we are using is a copy of the standard, and remains as if it was it.

I would like to thank you for all your support here, though.

Do you have any idea what else could it be?

Regards,

Leandro.

Nikhil_Walsetwar
Contributor

Hi Leandro,

Could you please try writing below code in your script workbench and see what it is returning?

Trace.Write(Quote.OrderID)

Steps you have to follow -

1. click on gearwheel icon and navigate to Script workbench. Paste the above code to it.

2. Navigate to new tab and open your quote no - 627.

3. Return back to script workbench and click on Run and check whether it is providing you the relevant order id or not.

BR,

Nikhil