Draft Order Address Uses Default Adress

Draft Order Address Uses Default Adress

JustinW
Shopify Partner
15 0 4

Hi,

I have a custom app that creates draft orders through the api. When then have sales reps update addresses in the draft order admin section. When the invoice is sent out to the customer, the address still defaults to the default address on the customer, despite having the address updated in the url.

Additionally, when I use either the rest api or graphql api to set the address and the  "useCustomerDefaultAddress": false, the shipping address STILL uses the default address. This seems to be a recent change, and not a desired effect. 

Please advise

Helping customers integrate their E-Commerce and Salesforce data
Replies 5 (5)

ShopifyDevSup
Shopify Staff
1453 238 498

Hi @JustinW,

 

When testing in a test store today, creating a draft order with the draftOrderCreate mutation and specifying a customerId, a custom address, and "useCustomerDefaultAddress": false, the draft order is being successfully created with the custom address.

 

Testing was done with GraphQL Admin API versions 2022-07 and 2023-04, with the deprecated DraftOrderInput.customerId and also with the newer DraftOrderInput.purchasingEntity and specifying the customerId inside of that.

 

So we're not able to replicate an issue with the info at hand. If you're still having trouble please provide more detailed info like what API calls are being made, which API version you're using, and a bit more about the input data being used.

 

Thanks and hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

JustinW
Shopify Partner
15 0 4

Hi,

This is correct that the draft order is created using the address from the API. But, when a customer clicks the payment link to checkout, the default address for the customer is used, and not the address on the draft order.

Helping customers integrate their E-Commerce and Salesforce data

Tom_Nardone
Shopify Partner
1 0 0

We are having this same problem without using an app and without creating the draft through the API. We are sending customers draft orders with a new ship-to address and when the orders are completed, they all have the ship-to address an old shipping address.

ShopifyDevSup
Shopify Staff
1453 238 498

Hi @JustinW,

 

Thanks for your reply. With that behaviour happening in the checkout that makes it an issue with the Checkout UI as opposed to the API, so for the most efficient help with this we recommend filing a report through the Partner dashboard's Support path with:

 

  • replication steps, while being clear the issue occurs after following the link to the checkout, 
  • mention of a specific store that you have access to where the behaviour can be replicated on, 
  • as well as a date/time/timezone in the past 7 days when the behaviour occurred

Thanks and hope you have a great day,
Jon551

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

JustinW
Shopify Partner
15 0 4

Jon,

Thank you for replying. I opened a ticket with support and they told me that this was not a problem they could solve, and that I should post on the community. If you can redirect me to where I can get this resolved that would be great.

Helping customers integrate their E-Commerce and Salesforce data