Developer forum

Forum » Ecommerce - Standard features » Orders at "Group level"

Orders at "Group level"

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

We are trying to integrate an ERP where there is no one-to-one mapping of customers to users in Dynamicweb, so we have mapped a customernumber from a dynamicweb user group instead, and all orders from users in that group are placed with the group customer number. Works fine and the ERP is at least happy.

HOWEVER, when viewing orders in DynWeb, obviously only the user who placed the order can see them because the OrderAccessUserId gets the AccessUserId of that user.

Would it be a good approach to set the accessuserid for the order, to the accessuserid of the group, and then modify the order list template giving it ability to show group orders aswell, or is this doomed to cause issues later?

 

 


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

HI Stephen,

 

In the Customer Experience Center app settings you should be able to choose "Customer Number" instead of User Id.

https://doc.dynamicweb.com/documentation-9/ecommerce/apps/customer-experience-center

 

Best Regards,

Nuno Aguiar

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

But that will be based on the users customer number, not on the groups customer number correct? So we have to ensure that everyone in the group also has their accessusercustomernumber set to the  groups accessusercustomernumber 

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Stephen,

 

Correct. That can be done in multiple different ways:

  • You can enforce that through Integration - if you're integrating users
  • You can set that with User Save Notifications
  • You may be able to set that using the OnExtranetLogin notification - that way it does not live on the user object, but it's added to it when it logs in, but it depends if the Customer Experience Center uses the User's object to get the customer number OR uses SQL to figure that out (this I'd have to dig to find out)
 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

We retrieve the customernumber for its group already using an OnExtranetLogin and set this in a session object, so I guess we have to modify the customer center apps template to use the session one (if its using SQL by default). Ofc it will get complicated though as we are using impersonation too, so hummm. I think its almost better to set the same customer number on the group, and all users in the group, and not fiddle too much around with the templates?

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Stephen,

 

You "can't" change the SQL query. It's done in the app itself, not in the templates. So you're likely better ensuring the customer number on the user is accurate (in the database) and everything else will just work.

Votes for this answer: 1

 

You must be logged in to post in the forum