Notifications on app install

itsarvind
New Member
1 0 1

Hello

I just got my app published with Shopify and looking to do incremental improvements.

As the app owner, If a merchant downloads my app from the store and has trouble installing it I would like to know it asap. Is there a event or web hook that can be leveraged ? Looking at online blogs / documentation I found notifications on "uninstall" but NOT when a merchant is having trouble during "Install". I would appreciate any thoughts / insights ?

 

Replies 5 (5)
louiscsmith
Tourist
3 1 0

Similarly keen to find out this information, please help!

ShieldServices
New Member
2 0 1

Hello itsarvind. Have you figured out anything regarding notifications when your app is downloaded? I just got my app approved and I would like to do onboarding with merchants when they download the app. 

Thank you,

Julian

stas-piatikop
Shopify Partner
2 0 0

@itsarvind @ShieldServices @louiscsmith 

Hey! 👋

 

I was looking for a solution to the same problem, and it seems we can use Partner API to track app installs and send notifications to the Slack channel, for example.

 

I will try to put together a solution and write a little later about what happened.

Perhaps I'll post a script that will help to track this 🙂

 

➞   Shopify Partner API – App events 

 

 

RelationshipInstalled — An event that marks that an app was installed

stas-piatikop
Shopify Partner
2 0 0

Btw, I found an example.

 

Click to expand...
{
  app(id: "gid://partners/App/5678") {
    id
    name
    events(
      first: 10,
      types: [RELATIONSHIP_INSTALLED RELATIONSHIP_UNINSTALLED],
      occurredAtMin: "2020-01-01T00:00:00Z",
      occurredAtMax: "2020-03-31T23:59:59Z"
    ) {
      edges {
        node {
          type
          occurredAt
          shop {
            id
          }
          ... on RelationshipUninstalled {
            reason
            description
          }
        }
      }
    }
  }
}
bishpls
Shopify Partner
20 5 7

If a merchant has an error during install, you should be catching that in your own server routing / handling.

 

The entry point for an install is, fundamentally, the URL you provide to your app -- the example setup has this checking whether you have an authorization cached for said shop; if not, redirect to a /login route; if so, redirect to your app. 

 

You can (and probably should!) try/catch the entire process and have explicit error handling so you know immediately when something goes wrong, for whom, and ideally, what the issue was; it's not on Shopify to notify you of such, nor do I believe there is an endpoint to do so.