Developer forum

Forum » Feature requests » Customer Center retrieve list by Impersonated User's Customer number

Customer Center retrieve list by Impersonated User's Customer number

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Considering the attachment, we're using the Order Drafts to replace Quotes, integrating quotes from an ERP into Dynamicweb.

 

This last option is using the UserId of the Impersonated users. It would be important for us if it would either:

  • Have a new option (maybe called "Own orders and orders made by users (based on customer number) that current user can impersonate"
    OR
  • Have the existing option look for both UserId and CustomerNumber

 

Best Regards,

Nuno Aguiar

 

CustomerCenter.png

Replies

 
Nicolai Pedersen
Reply

How would that work...?

If 2 users share customer number, just switch to the second bullet.

Or is it, sales person A, can impersonate customer B that has a colleague C that has same customer number as B but cannot be impersonated by A?

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

It's the Sales Rep scenario. To be clear, let's assume:

  • You are the Sales Rep
  • There are 2 Customers you can impersonate
    • DW (customer number = 123)
    • DWNA (customer number = 789)
  • I can only impersonte DWNA  (customer number = 789)

 

Considering that order drafts were all integrated/imported, there is no AccessUserId, so:

  • The first bullet does not work
    • because it's the user id that does not exist
    • because the order drafts are not associated with "You" but with the accounts you can impersonate
  • The second bullet does not work
    • because you'd have to be impersonating 1 account at a time to see the order drafts
    • because the order drafts are not associated with "You" but with the accounts you can impersonate
  • The third bullet does not work
    • because the code is getting the order drafts from the accounts you can impersonate based on userid, not customer number

 

So the Sales Rep really has to impersonate 1 customer at a time to do this. I understand this is the most reasonable setup, but our scenario is for Sales Reps that manage order drafts for all of their customers at a time.

(I realize there's an adjacent issue, which is creating an order draft from the UI and assiging it to a Customer. We'd have to update the templates or some notification to populate the customer number as well, otherwise we'll have an inssue between order drafts created on the web vs integrated)

 

Does that explain the issue better?

Nuno

 
Nicolai Pedersen
Reply

Hi Nuno

I still do not understand. (What does "I can only impersonte DWNA  (customer number = 789)" mean in this context...?

What customer number are you refering to? The one on the user or the one on the order...? So you do not attach the orders to a user?

So you have

  • Sales rep, userid=1, customer number = "chief1"
  • Customer A, userid=2, customer number = "a"
  • Customer B, userid=3, customer number = "b"
  • Customer C, userid=4, customer number = "b"

Sales rep, userid=1, can impersonate only customer B, userid=3

And then you have orders

  • Order1, userid=null, customernumber=a
  • Order2, userid=null, customernumber=b

And I have to list only order2 - so the issue is that your orders do not have a userid on them...?

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

You are correct. We should only be getting order2 per your example.