Development discussions around Shopify APIs
Hi @thescorpiolab ,
Welcome to the forums! I can help provide you answers here, but as an FYI all of your questions can be answered by going through the Shopify documentation for Kit Skills as an app extension here (and specifically this Overview page and this Endpoints page)
1 - It will be initiated by your side (i.e. your app has to inform Kit to start the conversation with the merchant). Your app should be monitoring the state of the merchant's store. Once your app notices that something has changed or happened to initiate the Kit conversation, your app should send a POST request to the following Shopify endpoint `https://{shop_name}.myshopify.com/admin/api/2019-07/graphql.json` with the headers of 'X-Shopify-Access-Token' and 'Content-Type' = 'application/graphql'. The body of this POST request to Shopify should look like this:
mutation { kitSkillTriggerRequest( id: "gid://shopify/KitSkill/b06e0a13-8f6e-4f03-8b23-0cc3f702e9b9", locale: EN, placeholders: "{\"locale\":{\"en\":{\"opening_message\":{\"shop_name\":\"My super shop\"}}}}") { conversationUid } }
Read more about this here
2 - There are two API endpoints your App needs to have and you should have provided. The first is called the “Execution Endpoint”. This endpoint will be called by Shopify if and only if the merchant has gone through the Kit conversation and accepted the request. When Shopify sends a POST request to this endpoint, you app should trigger the code to complete the request that the merchant just accepted. In other words - this is the endpoint that gets the job done once the merchant accepts the request.
Read more about these two endpoints here and here.
3 - See my answer for Number 1. The “placeholders” field in the body of your app’s POST request should correspond to the Liquid parameters included in your app extension definition. So in the example I provided, `shop_name` is the Liquid parameter set-up as part of the Proposal message, and it will be sent to the merchant with the value "My super shop”.
4 - What is this “JSON conversational endpoint" you speak of? As per the documentation and my answer to Number 1, the only endpoint your app has to call is ``https://{shop_name}.myshopify.com/admin/api/2019-07/graphql.json`` with the mutation `kitSkillTriggerRequest` in the body of the request. And in turn, as per the documentation and my answer to Number 2, your app should provide two endpoints (“Execution Endpoint” and “Feedback Endpoint”) that Shopify will call when the merchant accepts or rejects the request from the Kit conversation
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Thank you for the response, you have been very helpful and I am sorry for asking further questions beyond the documentation.
I have send post request to `https://{shop_name}.myshopify.com/admin/api/2019-07/graphql.json`
with mutation parameter but It is giving me error as shown below.
{"data":{"kitSkillTriggerRequest":null},
"errors":
[{"message":"Extension not found.",
"locations":[{"line":2,"column":3}],
"path":["kitSkillTriggerRequest"]}],
"extensions":{"cost":{"requestedQueryCost":10,"actualQueryCost":10,
"throttleStatus":{"maximumAvailable":1000.0,"currentlyAvailable":990,"restoreRate":50.0}}}}
I have already installed and setup kit on my store.
As I am looking into my submission in the partners account it is saying pending status for my kit extension.
Would you be able to approve my extension so that I can proceed further?
Hey @thescorpiolab ,
I do not have the access or the ability to approve your extension request through your Partner Account. If you have any question or concerns regarding your approval, I'd suggest you contact Shopify's Partner support (when you log into partners.shopify.com with your Partner Account, there should be a link to Support on the left hand side of your screen underneath Payouts and Education)
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Hey Hassain, thanks for your quick reply.
I have successfully sent the post request to graphql.json but it is giving me the message extension not found. I noticed my error is "extension not found" - so is this related to my extension as being "pending" or is it related to my coding?
I believe this error you are seeing is due to your app extension request still being in the "pending" status.
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Thank you greatly for all your help! I will reach out to support about my status.
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023