How can I know if the store/user make some action like a websocket

Solved

How can I know if the store/user make some action like a websocket

Juanestban
Shopify Partner
8 2 1

I don't know if for this case I can use Weebhook for know if the user currently be making some action like a create product, updating or removing, uploading file or any thing

 

in this cases how could I use this webhook or other way for know when the stores make changes in real time (like a web sockets)

Accepted Solution (1)

Samia_Akram22
Shopify Partner
60 10 15

This is an accepted solution.

@Juanestban 

In Shopify, webhook is not the ideal solution for real-time monitoring of user actions such as creating, updating, or removing products, uploading files, etc. Webhooks in Shopify are primarily used for sending data from Shopify to an external service when specific events occur, such as order creation, customer signup, product updates, etc. They are not intended for real-time monitoring of user actions within the Shopify admin.

For real-time monitoring and interaction, Shopify provides the GraphQL Admin API which allows you to query Shopify’s data in real-time using GraphQL subscriptions. GraphQL subscriptions enable you to subscribe to specific events or changes happening in the store in real-time. However Shopify's GraphQL API may not cover every specific action you're interested in monitoring, and the available subscriptions might be limited.

To achieve real-time monitoring for user actions like creating products, updating, removing, or uploading files within the Shopify admin, you might need to periodically query the Shopify Admin API endpoints using GraphQL or REST APIs to check for changes. You can set up a scheduler or use a background job to regularly check for these changes and trigger actions accordingly.

Alternatively, if you are looking for real-time interactions within the Shopify admin, you might want to explore the use of JavaScript libraries or frameworks (like React, Vue.js) to build custom admin interfaces that use WebSocket connections or long-polling techniques to achieve real-time updates. This involves creating a custom app or extension within Shopify to provide real-time functionality based on user actions.

Be aware that the capabilities and available methods might have been updated or expanded in Shopify . It's advisable to refer to the latest Shopify documentation or their developer resources to check for any new features or APIs that might facilitate real-time monitoring of user actions within the Shopify admin.

Problem Solved? ✔Accept and Like solutions to help future merchants.

View solution in original post

Replies 2 (2)

PaulNewton
Shopify Partner
6405 584 1359

The api does not use realtime websockets, no such thing.

 

Beyond that you need to more carefully describe what the goal is as the post description is hard to follow.

https://xyproblem.info/ 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


Samia_Akram22
Shopify Partner
60 10 15

This is an accepted solution.

@Juanestban 

In Shopify, webhook is not the ideal solution for real-time monitoring of user actions such as creating, updating, or removing products, uploading files, etc. Webhooks in Shopify are primarily used for sending data from Shopify to an external service when specific events occur, such as order creation, customer signup, product updates, etc. They are not intended for real-time monitoring of user actions within the Shopify admin.

For real-time monitoring and interaction, Shopify provides the GraphQL Admin API which allows you to query Shopify’s data in real-time using GraphQL subscriptions. GraphQL subscriptions enable you to subscribe to specific events or changes happening in the store in real-time. However Shopify's GraphQL API may not cover every specific action you're interested in monitoring, and the available subscriptions might be limited.

To achieve real-time monitoring for user actions like creating products, updating, removing, or uploading files within the Shopify admin, you might need to periodically query the Shopify Admin API endpoints using GraphQL or REST APIs to check for changes. You can set up a scheduler or use a background job to regularly check for these changes and trigger actions accordingly.

Alternatively, if you are looking for real-time interactions within the Shopify admin, you might want to explore the use of JavaScript libraries or frameworks (like React, Vue.js) to build custom admin interfaces that use WebSocket connections or long-polling techniques to achieve real-time updates. This involves creating a custom app or extension within Shopify to provide real-time functionality based on user actions.

Be aware that the capabilities and available methods might have been updated or expanded in Shopify . It's advisable to refer to the latest Shopify documentation or their developer resources to check for any new features or APIs that might facilitate real-time monitoring of user actions within the Shopify admin.

Problem Solved? ✔Accept and Like solutions to help future merchants.