Re: How to add TimeLine Comment to Customers using REST APIs?

How to add TimeLine Comment to Customers using REST APIs?

Shopify Partner
9 0 6

I am looking to add comments using REST API on customer object, and I am able to add these comments from front-end easily requests are hitting with message and other variables but when I read the documentation it tells that mutation timelineCommentCreate doesn't exist on the 'Mutation' type.


How can we achieve this?

Replies 5 (5)

Shopify Staff
2807 310 805

Hi Abdul_Qayyum,


The timelineCommentCreate mutation is not available in Shopify's public API. If you want to store extra data about a customer, one workaround could be to use Metafields. You can create a new metafield for a customer and store your comment there. You can use the metafieldCreate mutation in the GraphQL API, or you can use the /admin/api/#{api_version}/customers/#{customer_id}/metafields.json endpoint in the REST API to do this.


Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog

Shopify Partner
9 0 6

Is there any way i can create the activity using REST API?
I just want to create a timeline activity programmatically in Shopify using REST API or something else if Comment APIs are not available!




Shopify Partner
235 6 55

same here, is it on the backlog to add this to the api rest or graphql? would be great if we can add events to the timeline for specific orders through the api


Software Developer | Owner of Tom IT - We build shopify apps
Marketplace Order Connector | Amazon & Walmart DSV
Order Related Documents | Print documents, Email document &Autoprint
Blog Product Spotlight | Add products to your blog articles!

Shopify Partner
2 0 6

After two large archived threads, and multiple more requests, you would think this would become a priority. Is this going to be added any time soon?

We need to be able to log internal communication per order, and the time stamp helps. There are quite a few use cases for us. And for now it means I have to use my scripts to notify someone who then has to do it manually. Why is this not a thing? Shopify, let us COMMENT!

7 1 7

As an alternative to using the Metafield technique to add a comment, I thought I'd share another 'hack' to accomplish a timeline post.  

I learned from another discussion on this topic ( that if you add an order note, it adds that change to the timeline (including what was added).  So...   

1) Get the current Order Note 

2) Change the Note to what you want to communicate in the Timeline

3) Change the Note back to the original Order Note.  



This does require expanding the timeline post to actually see the comment, but hey, this is a hack so what do you expect?!?!  🤣