How to implement custom trigger after created?

Solved
New Member
3 0 0

I was excited to see that you can create custom triggers and actions for workflows. However, I am stumped as to how the custom trigger is actually stored or used. Is it stored as some kind of object? Do you call it with javascript? Need to get this done to hit a connector I'm building for a large client. Docs do a great job of showing how to build them, but a terrible job of how to use them. Any help or example would be much appreciated. Thanks!

0 Likes

Hi @frustratedswede! Thanks for your question.

 

Since Flow triggers or actions are built on the app extensions platform, you must have the listed or unlisted app you built them on installed on the shop you want to use them in. Then, when you go into Shopify Flow in that same shop, the app's triggers and actions will be visible. 

 

Does that help?

Anthony // Product Marketing Manager @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Learn about Shopify Plus

0 Likes
New Member
3 0 0

I understand that, and have those done. I meant more how of the actual trigger is activated on the page, and how you would code that. Say for example, the trigger hits when a certain button is clicked. Thanks for the quick reply!

0 Likes

Success.

@frustratedswede It's hard to say as I don't know exactly what the action is (or where it happens) that is supposed to start the trigger in Flow, but is your app sending a request to this graphQL endpoint (https://{shop}.myshopify.com/admin/api/2019-04/graphql.json) to start the workflow? 

 

More information on this part of building a trigger can be seen here: https://help.shopify.com/en/api/embedded-apps/app-extensions/flow/create-triggers#step-2-add-support...

Anthony // Product Marketing Manager @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Learn about Shopify Plus

0 Likes