How to make orders create using `orderCreate` GraphQL mutation showable on customer account page?

Hello
The orders created using orderCreate GraphQL mutation don’t show on the customer account page.

Any thoughts?

Hi @remy727,

I’ve looked into this behaviour further on my own test store, and I can confirm that when an order is created with the orderCreate mutation, as long as the customer is added via the order.email or order.customer.toAssociate input arguments, the orders are in fact displayed in the Customer Account Page.

However, there is another behaviour that might explain what you’re seeing here. If a customer is associated with a B2B company on the store, only the B2B orders also associated with that company that the customer makes will be displayed in the Customer Account Page.

So if you create an order for a B2B customer via the orderCreate mutation, and do not include the order.companyLocationId input argument to associate the order with a B2B company, then it won’t be displayed in the Customer Account Page.

I can confirm that this is expected behaviour at this time, but we do have a couple different workarounds to this behaviour that I can recommend:

  • One workaround is to remove the customer from their current B2B Company and then re-add them to the company again. By doing this, the merchant will be prompted with the option to change the existing personal orders into B2B orders for that company. Please note that this will make the orders visible on the account page, but will also share the details of these existing orders with any other company members.

  • Alternately, if the merchant regularly supports both personal and B2B orders on their store, the customer can have two separate accounts, using different email addresses, leaving the personal account disconnected from all B2B companies.

If you have any specific examples of this behaviour occurring, with a customer that is not associated with a B2B company, we can absolutely help look into it further by reaching out to our Shopify Support Team via the Shopify Help Center, with examples of customers, including screenshots showing the missing orders, and the HTTP Request and Response data from the API call that created the order, specifically:

  • The full plain text HTTP Request, including URL, Body, and Headers (no access tokens)
  • The full plain text HTTP Response, including Body and Headers
1 Like

Hi @remy727

Could you please share your request parameters and the payment status of the order you created?