Identify POS Staff Member

Sling
New Member
3 0 0

Hello.

 

We want to extend our current Shopify app and integrate it with the Shopify POS app.

We are wondering if there is a way to identify the staff member who logged in the Shopify POS app (the staff member who entered the PIN number).

 

We have tried the following:

  1. Used the method `app.getState()` of the Shopify app bridge. It doesn't contain enough info to identify the staff member.
  2. Called the current user endpoint from the User Resources withing the POS app (GET /admin/api/2020-04/users/current.json). This looked very promising; however, it is the information of the user who completed the OAuth authorization flow.

Thanks in advance!

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 227

I have run across similar challenges for awhile now. Here's the (dated) thread --> https://community.shopify.com/c/Shopify-for-Retail-Stores/Retrieving-Staff-Who-Helped-with-Sale/td-p.... Something like this should be pretty basic I think, but apparently not :( 

andrew-apperley
Shopify Staff
Shopify Staff
20 5 4

Hey @Sling,

The information for the staffMember in getState() is limited because its accessible from multiple surface areas (shopify admin, shopify mobile, and shopify pos.

However, there is a way with App Bridge for getting the currently logged in user for the POS terminal.

Link to docs

app.getState('pos.user').then((user) => {
    const {firstName, lastName} = user;
    console.log(`Current POS user is: ${first} ${last}`);
});


I hope this helps you out.

Andrew Apperley
(App Bridge) Mobile Developer
0 Likes
Greg_Kujawa
Shopify Partner
1016 83 227

What our issue we ran into wasn't just the logged-in user, it was the Staff Who Helped with Sale. I couldn't find this anywhere via any API, be it the App Bridge, POS SDK, REST API, GraphQL API, etc. Roughly 10-15% of our larger dollar sales are split between two different salespeople. As a workaround I had to create an Edit Cart function for adding some line item properties to indicate a split salesperson.

0 Likes