I am running this query:
{returns(date_from:“2000-10-01”){complexity data(first:500 ){pageInfo{hasNextPage endCursor} edges{node{id legacy_id order{ order_number rma_labels{created_at id tracking_number legacy_id status delivered picked_up updated_at}} reason status reason created_at exchanges{exchange_items{id sku quantity}} line_items{ id return_id type reason quantity line_item{sku price} condition}}}}}}
Why is the RMA Label “created_at” the same as the “updated_at”. I am trying to use the updated date to determine when the Return is completed. Maybe there is a better way?
Yes. I would agree. All I need is a way to get the “updated_at” date. In my tests its always the same as the “created_at”. This is what I am trying to figure out.
Any chance someone in support can respond to this?
Why is the RMA Label “created_at” the same as the “updated_at”. I am trying to use the updated date to determine when the Return is completed. Maybe there is a better way?
Work for that purpose?
That way if the status is completed you can say it’s complete and that there are no items pending to receive back.
You could also complement this with the return update webhook: https://developer.shiphero.com/webhooks#return-update-webhook
Just to confirm. Your queries have no way to return the actual DateTime for when a return is completed. The only solution is to handle webhooks. Correct?
If this accurate, id like to make a request that you add a “completed_at” field in the return record.
Correct @bbarrett, webhooks will work for any kind of update on the return.
I will make that request then and let you know as soon as I get a response back.
The request would be to include the updated_at field on a return, something like this:
Ideally there would be both the “completed_at” date specifically and an “updated_at”. But I’ll take what I can get.
If you think through using webhooks to facilitate generating a reports of returns with the completed at date…
I would need to trap webhook events and save all the return completed dates into some local database. Then join my report data to the local database for getting the completed date. Moreover, you state in your documentation that you do not guarantee the web hooks will always fire! And that developers should always run some kind of “reconciliation” to fill in the data that failed in webhooks. Obviously, this would not work for the return completed_at because it can ONLY be gotten from the webhook.
Anyway… Yes. This might be possible but would be a horrible design. I hope your development staff recognize this. The completed date for a return is a basic element of a return and it should be saved on the return record and easily returned in the Return queries.
For that purpose, you could compare the status of the order you have with the one you get from our API and check if there is any difference for the returns not completed yet for example.
Perfect then! I logged the request to expose the updated_at. That way between updated_at and status you can see when it was completed.
I will let you know as soon as I get a response about it.
Thanks again!
Tom