multipass + existing shopify customer

Highlighted
New Member
2 0 0

I have a question regarding best practice for a Shopify login flow we are building. I have looked through the forums but unfortunately cant find something helps with my question.

 

On the multipass doc page, under FAQs it states:

Some of my customers have already placed orders on Shopify. How do I update those customers so they can login through multipass?

You can use the Update Customer API to set the multipass_identifier for the customer. You will need to use the identifier with all your multipass requests for those customer accounts.

 

In the case of the integration we are looking to build with our product we have no way of knowing if any given user may or may not have signed into an existing Shopify store before.

 

Are we better off treating any customer as an existing one? Meaning even if they are created automatically we still use the Update Customer API to send the identifier and any other optional data?

 

Many Thanks

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

Hey @appengine,

 

You'll only need to use identifiers if multiple users could have the same email address:

 

At Shopify, we use email addresses as unique identifiers for customers of a shop. If your site uses other identifiers (such as usernames), or if it is possible that two different users of your site registered with the same email address, you must set the unique identifier in the "identifier" field...

Assuming the emails are unique, you shouldn't need to set the identifier field. When you use Multipass login on an existing customer, they'll just be logged in (i.e. a duplicate account wont be created). If they don't have an account yet, one is created.

 

Let me know if you have any questions!

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes
Highlighted
Shopify Partner
5 0 0

Hey @SBD_ 

 

If an email (account) doesn't exist and multipass is going to create one, does it follow the standard account creation process of sending the verification email to the customer before the account is activated? I'm wondering how the customer assigns their password for the Shopify site/account if we make this an automated, seamless process under the hood?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

Hey @Brian_Horner,

 

You might find a combination of these threads helpful:

https://community.shopify.com/c/Shopify-APIs-SDKs/Account-automatically-created-via-Multipass-What-i...

https://community.shopify.com/c/Shopify-APIs-SDKs/Customer-API-Password-Reset/td-p/131304

 

TLDR: Their password will be randomly generated. If you log them in through Multipass, they won't need to enter a password on Shopify's side. If you'd like them to login through Shopify, you could use the API to send them an account activation email where they can set a password.

 

 

Notice; Out of office, replies will be delayed until my return. Thanks!
1 Like
Highlighted
Shopify Partner
5 0 0

Thanks @SBD_ . This helps but I will need to do some testing on my sandbox site to see exactly how to handle new customers who will have an account created by MultiPass. Cheers.

0 Likes
Highlighted
New Member
3 0 0

Sure you can. here is npm package you can use right away

 

https://github.com/softmarshmallow/multipass-js

0 Likes
Highlighted
New Member
4 0 0

Welcome to test generate Multipass URL with the online tool.

0 Likes