question

Rohit Bhardwaj avatar image
Rohit Bhardwaj asked eugenephilip572 sent

Get and set current employee to an order

Hi,

I wish to get the current active employee logged into the device. I also wish to assign this employee to the current order which is being created through our app. How can I achieve this?


Also, if a merchant has a couple of devices, and these devices have different logins for employee. Keeping this in mind, how can I assign the active employee to an online order which has been placed using a website? If the notification is sent to these devices, same order will be assigned to different employee. What should I do in order to avoid this?


Please advice.

OrdersEmployees
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rohit Bhardwaj avatar image Rohit Bhardwaj commented ·

Hello, can anybody help me here?

0 Likes 0 ·

1 Answer

·
Dan avatar image
Dan answered Brian commented

When an order is created through OrderConnector#createOrder, the employee, if any, provided by the caller is ignored. The active employee is used instead.

You should be able to change the employee associated with an order by calling OrderConnector#updateOrder.

I don't fully understand what you mean by "how can I assign the active employee to an online order which has been placed using a website? If the notification is sent to these devices, same order will be assigned to different employee".


An order can only have one employee. I think an order created through the rest api allows a null employee for an order, but if the order is changed through the clover-android-sdk OrderConnector (e.g. OrderConnector#updateOrder) is called, it will see the null employee and set it to the currently active employee.

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rohit Bhardwaj avatar image Rohit Bhardwaj commented ·

I only wanted to understand if I can assign an employee to an order using create orders API. Your answer clears my doubt. Thank you!

0 Likes 0 ·
Brian avatar image Brian commented ·
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community