Hi guys
We are starting to look into supporting historical order history across sales channels (online store, external pos, retired old webshops etc). We have previously done this using the REST Api for ‘order create’ which was rich in functionality, however stability of that specific API was poor in our experience (Seems like Shopify had a rough time processing very old orders). We’re trying to make the switch to use the GraphQl API, like most of our other integrations, however it does not seem like there’s a way to set ‘createdAt’ which seems to determine “Complete date” somewhat in the /account for the end customer.
I created a quick demonstration to show our issue.
The following GraphQl payload is sent:
{
"order": {
"name": "HistoricalOrder1",
"sourceIdentifier": "",
"closedAt": "2025-03-30T08:14:11.5000000Z",
"processedAt": "2025-03-28T08:14:11.5000000Z",
"buyerAcceptsMarketing": true,
"email": "tnb@novicell.dk",
"currency": "DKK",
"financialStatus": "PAID",
"fulfillmentStatus": "FULFILLED",
"poNumber": "123",
"phone": "+4520304050",
"taxesIncluded": true,
"fulfillment": {
"locationId": "gid://shopify/Location/85771288885",
"notifyCustomer": false,
"trackingNumber": "123",
"shipmentStatus": "DELIVERED"
},
"lineItems": [
{
"title": "An item",
"sku": "p1v1",
"variantId": "gid://shopify/ProductVariant/46259409781045",
"quantity": 1,
"requiresShipping": false,
"variantTitle": "My variant",
"priceSet": {
"shopMoney": {
"amount": "100",
"currencyCode": "DKK"
}
}
}
],
"transactions": [
{
"status": "SUCCESS",
"amountSet": {
"shopMoney": {
"amount": 100,
"currencyCode": "DKK"
}
},
"authorizationCode": "test-123",
"gateway": "My test gateway",
"kind": "SALE",
"processedAt": "2025-03-29T08:14:11.5000000Z",
"test": true
}
]
},
"options": {
"inventoryBehaviour": "BYPASS",
"sendReceipt": false,
"sendFulfillmentReceipt": false
}
}
Here we would expect the order to be createdAt ‘2025-03-28T08:14:11.5000000Z’ and completed / closed ’
2025-03-30T08:14:11.5000000Z’
Shopify responds with the following dates:
"order": {
"id": "gid://shopify/Order/6556306833717",
"createdAt": "2025-05-01T11:50:09Z",
"processedAt": "2025-03-28T08:14:11Z",
"closedAt": "2025-03-30T08:14:11Z"
},
The order shows up in the /account page the following way:
Our main issue here is that it is sorted by Complete date, where this seems to correspond with the Shopify generated ‘createdAt’ date. However, our clients are expected to import orders going waaaay back, meaning several years and it would be misleading to the end customer if all their old purchases shows at the top of the account page.
Anyone found any workarounds using existing GrahpQl API’s?
Thanks!