Help with Kit Skills, any help would be greatly appreciated!

thescorpiolab
Shopify Partner
7 0 1
Hello everyone, I’m new to the forums and thanks in advance to anyone that can help!

1) how will KIT send the notification to the merchant, will this be automatic or will I have to inform KIT from our side? If it’s from our side, then how will I set up our trigger to send from us to KIT then send to the store owner?
2) how can I utilize the url we provided for the api endpoint because we have created an empty function with a route in our programming but don't know what to put in it?
3) how and where will the liquid variable be replaced?
4) As per the Kit documentation there is nothing mentioned where to hit the Json conversation data, can someone please confirm the api end point?
Replies 6 (6)
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 104 182

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. 

 

The second endpoint your app needs to have and provide is the “Feedback Endpoint”. This will be called by Shopify when the merchant either accepts or rejects the request through the Kit conversation. If the merchant rejects the request, the body of the POST request from Shopify to this endpoint will contain the reason why the merchant rejected the request. When Shopify sends a POST request to this endpoint, there is nothing your app needs to do other than acknowledge and store this data.

 

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 

thescorpiolab
Shopify Partner
7 0 1

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?

hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 104 182

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 

thescorpiolab
Shopify Partner
7 0 1

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? 


hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 104 182

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 

thescorpiolab
Shopify Partner
7 0 1

Thank you greatly for all your help! I will reach out to support about my status.