You can use a marketing activities app extension to enable merchants to manage promotional campaigns and marketing automations from the Marketing page in the Shopify admin using your app.
This guide describes how your app works with the marketing activities app extension and Shopify to support marketing activities. It also describes how you can connect a marketing app to the Shopify platform.
How it worksAnchor link to section titled "How it works"
Marketing on Shopify helps merchants find and sell to customers using a variety of means, including content marketing, SEO, and social media. You can add a marketing activities app extension to your app to surface your app directly in the Marketing page in the Shopify admin.
Using a marketing activities app extension, you can complete the following tasks:
- Configure the marketing activity form that's rendered in Shopify admin.
- Enable app users to preview marketing activities on your platform.
- Manage a user's marketing onboarding state.
- Manage the lifecycle of a user's marketing activities.
- Track a user's marketing activity engagements.
Defining a marketing activity formAnchor link to section titled "Defining a marketing activity form"
Using Shopify’s form builder inside the Partner Dashboard, you can define the fields necessary for your activity to participate in a marketing campaign. There are many components to choose from. Some of the components are generic, like
numbers, while others allow you to access Shopify data, like
Rendering a marketing activity formAnchor link to section titled "Rendering a marketing activity form"
Each marketing activity extension is uniquely identified by its UUID, which is used to open the marketing activity form.
Shopify calls your app's preload endpoint to render the marketing activity form. Your app is responsible for responding with form data based on the merchant’s marketing activity and the state of a merchant's shop data. Shopify also calls your app's error feedback endpoint to report whether there were problems with your marketing activity extension.
- The merchant uses the app extension form to create a marketing activity.
- Shopify calls your app's preload endpoint.
- The app responds with form data.
- The creation form is rendered with the preview.
- If there is an error rendering the form, then Shopify reports this to the app's error feedback endpoint.
Publishing a marketing activityAnchor link to section titled "Publishing a marketing activity"
After a merchant publishes a marketing activity, Shopify calls your app's create endpoint to create the marketing activity. Your app is responsible for validating the form data. After the marketing activity is created, your app calls Shopify to update the status of the marketing activity using the
- The merchant clicks to publish the marketing activity.
- Shopify creates the marketing activity and sends a request to the app's create endpoint
- The app validates the form data, publishes the marketing activity asynchronously, and updates status information using the
- Shopify updates the marketing activity status.
- Shopify renders the marketing activity.
Connecting a marketing app to ShopifyAnchor link to section titled "Connecting a marketing app to Shopify"
You can use the GraphQL Admin API to create and manage marketing efforts in your app or on a platform outside of Shopify. By integrating with Shopify, apps can connect their data, and app users can access a complete picture of how their marketing efforts are performing.
For more information, refer to Connect a marketing app to Shopify.
Developer resourcesAnchor link to section titled "Developer resources"
Marketing activities components reference
Learn about the different components that you can use to build a marketing activity form.
Marketing activities endpoints reference
Learn about the endpoints that you need to add to your app to support marketing activities.