Solved

Why can't I access customer phone numbers in order details?

dfearnley
Tourist
3 1 0

The customer phone number is not available. I.e. customer.phone doesn't work. I can grab phone number from addresses, but not from client general information.

Accepted Solution (1)
dfearnley
Tourist
3 1 0

This is an accepted solution.

So here's the problem:

The shipping_address.customer is not useful for POS as the person is right in front of you and does not need nor want to fill out their address. Also I can't manually create any addresses after the fact with the name and phone number only, as your UI requires full addresses.

When I sell to a customer using the POS, they have the option to receive their receipt either via email or phone number. THAT's the phone number I'm trying to access. The phone number is collected and stored in the customer profile.

I can access the email using customer.email, but not the phone number using customer.phone. This phone number is stored in the customer profile and can be accessed by various Shopify forms such as viewing the order which means you just aren't exposing customer.phone to certain APIs, in my case the one used for the order printer template.

I can't see any reason as to why the phone number is not available to the order printer template.

My request is for Shopify to expose customer.phone or provide an explanation as to why this approach is being taken. It seems like an oversight which, by the way is causing me a ton of extra work when trying to print out detailed receipts.

 

 

View solution in original post

Replies 7 (7)

Miles
Shopify Staff (Retired)
480 68 158

Hi, @dfearnley!

I'm Miles from the Social Care team at Shopify. Great to hear you're enjoying Order Printer. I'll be happy to help you out with pulling your customers' phone number into your invoices.

To pull in the customers' phone number, you'll need to use {{ shipping_address.phone }} instead of customer.phone for Order Printer. I've done a test on my store and can confirm the customers' phone number does indeed come across. It's important to note that the customer will need to have entered their phone number in the shipping details in order for the number be pulled into the invoice.

If you're ever unsure of how to pull certain data across into Order Printer, when you're editing a template, click "View the Liquid variable list" on the side and you'll be able to see all the data points and corresponding code.

Please let me know if you need a hand with anything else at all.

To learn more visit the Shopify Help Center or the Community Blog.

dfearnley
Tourist
3 1 0

This is an accepted solution.

So here's the problem:

The shipping_address.customer is not useful for POS as the person is right in front of you and does not need nor want to fill out their address. Also I can't manually create any addresses after the fact with the name and phone number only, as your UI requires full addresses.

When I sell to a customer using the POS, they have the option to receive their receipt either via email or phone number. THAT's the phone number I'm trying to access. The phone number is collected and stored in the customer profile.

I can access the email using customer.email, but not the phone number using customer.phone. This phone number is stored in the customer profile and can be accessed by various Shopify forms such as viewing the order which means you just aren't exposing customer.phone to certain APIs, in my case the one used for the order printer template.

I can't see any reason as to why the phone number is not available to the order printer template.

My request is for Shopify to expose customer.phone or provide an explanation as to why this approach is being taken. It seems like an oversight which, by the way is causing me a ton of extra work when trying to print out detailed receipts.

 

 

Miles
Shopify Staff (Retired)
480 68 158

Hi again, @dfearnley!

Apologies for the delay in responding. Thanks for your feedback and clarification around POS. I totally agree that this does cause some issues on POS.

At the moment, Order Printer is unable to pull data from customer.phone, so I'll need to raise this feedback with the team so they can consider fixing this in future. I'll also specify the reasoning behind it around POS and not having the shipping address.

If you have any other questions in the interim, please let me know.

To learn more visit the Shopify Help Center or the Community Blog.

dfearnley
Tourist
3 1 0

Thank you for passing on my suggestion.

Stkono
Tourist
7 0 4

@Miles, yes, please do so. Would be great to have this for all of the customer data! 
Thanks, Stefan

PeanutButter
Shopify Partner
385 67 182

This is still an issue to date.  

Peanut Butter Collective | Shopify Experts
- Was my reply helpful? Please Like and Accept Solution.
- Want to customize and improve your store? Hire us.
- Feel free to contact me us hello@peanutbutter.es
mudie3309
Visitor
2 0 1

Same issue