Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How can I use Shopify Flow to update customer contact details?

How can I use Shopify Flow to update customer contact details?

sandeepsomai
Shopify Partner
13 0 4

hey Shopify Community,

 

I am using Brevo application and What I see here is that Brevo is unable to fetch phone number from Shipping details. Brevo is fetching "PHONE" attribute but I don't think that it is the same from "BILLING_DETAILS". Now we have Shopify for Phone. One is in customer.phone and another is address.phone so I want to use Shopify Flow to update customer.phone from a value which is in address.phone

 

I want to Update this field.

SF1.PNG

 

with this fields details

SF2.PNG

 

Is there any way to do it using Shopify Flow. I want to update the customer phone number when customer is providing their phone number in shipping/billing details and I wanted to do it using Shopify Flow. Since I have enabled only Email address at the checkout for transactional and email purpose so. Customer can only provide their number in billing and shipping so I want to update their contact number from the number they have provided in the shipping/billing detail.

 

I have tried this. Will this code make it happen

SF3.PNG

 

please help me in this community.

 

Thanks

Sandeep Kumar | Ecommerce Analyst
Replies 3 (3)

paul_n
Shopify Staff
1429 156 330

It's not clear which phone number you are trying to update.

 

I don't think you want to use a metafield, but if I'm missing something....are you sure your namespace is actually custom.phone? It's probably just custom and the key is phone. But that won't update the field you want. It will just update a metafield called custom.phone.

 

Also, you are looping over customer addresses and outputting the phone. If they have more than 1 address you may output several phone numbers. Based on that UI, I think you want the order.customer.defaultAddress.phone field. 

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
sandeepsomai
Shopify Partner
13 0 4

Hey Paul_n,

 

What I want to achieve using Shopify Flow is that. When customer places any order Flow Should Fetch phone number details from their Default Address and update customer phone number with that. I have been trying this with shopify flow. and I can share you the screen shot here as

 

This is my shopify flow for doing this.
SS1.PNG

 

I ran it and it shows ran successfully.

SS3.PNG

 

But it did not update the customers' phone number field as I can show you here.

SS2.PNG

 

please help me out. if I am lacking in using shopify flow. 

Sandeep Kumar | Ecommerce Analyst
paul_n
Shopify Staff
1429 156 330

You are updating a customer metafield and not the customer itself. Updating this customer metafield will have no effect on the phone. 

 

I'm pretty sure you clicked edit contact information on the customer page to see that UI. To update that, you'll need to call the API directly using the Send HTTP Request task and this API https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerUpdate

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.