Developer forum

Forum » Integration » OrderCustomerNumber in user integration from DW to BC

OrderCustomerNumber in user integration from DW to BC

Tomas Gomez
Reply

Hi,

We have a B2C where users are created in DW and need to be integrated into BC. This way, we create the users in BC when the user places his first order.

The problem is that, when placing an order, the UserID is not present in any field of the order xml. We expected that the OrderCustomerNumber would be the UserID but in all the orders this field is 999999999 (that is the ID of the anonymous user in BC). 

Is it possible to configure the OrderCustomerNumber with the UserID? If not, what would be the alternative?

Regards,
Tomas


Replies

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply
This post has been marked as an answer

Hi Tomas,

You cannot alter the value of OrderCustomerNumber without a hazzle. Though, the order does have a OrderCustomerRefId, which you could use for this purpose, if not already in use (mostly, it is not used). So if this is useful to you, just pass the value somewhere in your cart flow, being template or notification subscriber as you see best fit.

If you are already using this field, the easy approach is to simply add a new (custom) orderfield to the order that can hold the value of the AccessUserId.

Have in mind though, if a user is deleted in Dynamicweb and then created again, the AccessUserId as reference will be broken (which is why it is not used in Live Integration)

I hope the above was helpful.

BR
Snedker

Votes for this answer: 1
 
Tomas Gomez
Reply

Hi Morten,

Thanks for the reply :-)

We didn't know about the purpose of OrderCustomerRefId, it is a nice solution to fill it with AccessUserId. 

Regards,
Tomas

 

You must be logged in to post in the forum