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

How to write cronjob to send the orders to SAP using data hub

Former Member
0 Likes
597

Hello,

I am trying to send the orders (using Data Hub) to SAP with out of the box extensions ( saperorder raw, canonical and target). Is there any document that explain the steps & how to configure the cronjob and that cronjob will read the orders and send to SAP using Data Hub.

I searched for order management using cronjob and not able to find any example on the help.

Any help on the steps and cron job example will be really helpful.

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hello Sarath,

If we configure sap-order-process in the base store like you said it will be synchronous call right? I mean when the customer place an order on the web site it will publish to data hub only if data hub is running. If data hub not running or if there is any failure while publishing the order then customer can't place an order. Am I correct?

This is not the best approach right. We need to capture the order in store front and then send to SAP using data hub thru some cron job. Am I correct?

Also I didn't get what does mean call explicitly SendOrderToDataHubAction class to send an order to ERP.

Please let me know what I said is not correct or not?

Former Member
0 Likes

人家都给你说得那么清楚了,自己看代码去呀,还这问问问

Former Member
0 Likes

hi @sasireddy,

You can check OOTB sap-order-process.xml business process. sapOrderexchangeSendOrderToDataHubAction is used to send data from hybris to erp system.

java class: SendOrderToDataHubAction

add sap-order-process in basestore -> select base store ->properties ->Submit order process code field. order get published to configured datahub if you don't want to use this way you can write a cron job which triggers to call a business process or you can explicitly call SendOrderToDataHubAction class to send order to erp system
Former Member
0 Likes

Thanks for your response. I thought we need to use SapOmsSendOrderToDataHubHelper java class ( which has method createAndSendRawItem(..) ) in the cron job to send the order to SAP.

I see the SendOrderToDataHubAction.java class has method executeAction(...) which doing the same thing.

Now I am confused which class need to use for sending order information to SAP from hybris.

Former Member
0 Likes

Hello Sarath,

If we configure sap-order-process in the base store like you said it will be synchronous call right? I mean when the customer place an order on the web site it will publish to data hub only if data hub is running. If data hub not running or if there is any failure while publishing the order then customer can't place an order. Am I correct?

This is not the best approach right. We need to capture the order in store front and then send to SAP using data hub thru some cron job. Am I correct?

Please let me know what I said is not accurate?

Former Member
0 Likes

you have to use AOM extension.you can configure retry and cleanup job for orders if datahub is not running. Please read https://help.hybris.com/6.6.0/hcd/8b8ac51b866910148e68c3be8963eb96.html