Hello, I’m just diving into the Square API looking for a way to gather customer e-mail and phone outside the built-in Square options. I’d like to have a webpage where I gather customer name, e-mail and phone then pipe that over to Square to create a customer with name, phone and e-mail to use for loyalty and marketing within Square.
Looks like the API can:
Create new customers in the directory and
Create new loyalty accounts
I don’t understand if creating a new customer with a phone number automatically adds the customer to the loyalty program…
Or do I need to create the new customer with the customer API and then also create the new loyalty account?
Again, just getting started here and going through the docs so hopefully this makes sense.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
You’re correct in your understanding. The process of enrolling a customer in a loyalty program is a two-step process:
First, you would use the Customers API to create a new customer in the directory. This will create a customer profile with the provided name, email, and phone number.
After creating the customer profile, you would then use the Loyalty API to create a new loyalty account for the customer. This will enroll the customer in the loyalty program.
Creating a new customer with a phone number does not automatically enroll them in the loyalty program. These are two separate actions that need to be performed.
Thanks for confirming, Bryan! I just got that to work in the API explorer. Very cool.
Out of curiosity… when you create a new customer in the directory, a phone number is one of the inputs. And when you create a new loyalty account using that customer’s ID, you can specify a phone number…
what happens if you use a different phone number for creating the loyalty account than the customer’s directory phone number (if that makes sense)
Is there any way to view a list of loyalty accounts and their phone numbers outside the API? It probably won’t matter as long as whatever I build uses the same value for customer phone and loyalty phone but I’m just curious how our non-technical staff might manage that if things did get mixed up.