Migrate marketing activity extensions to Shopify CLI
If you have existing marketing activity extensions that were created and are managed through the Partner Dashboard, then you should migrate them to Shopify CLI.
Anchor to RequirementsRequirements
- You have the latest version of Shopify CLI.
- Your Partner Dashboard app has been migrated to CLI.
Anchor to Step 1: Import your Marketing Activity extension locallyStep 1: Import your Marketing Activity extension locally
-
Navigate to your app's directory.
-
Run the following command:
Terminal
#!/bin/bashshopify app import-extensions -
Select
Marketing Activity Extensions
as the type of extension to import. -
Select an extension to import from the list.
After completing the prompts, a TOML file is generated by importing your extension's existing configurations.
Anchor to Step 2: Verify your TOML fileStep 2: Verify your TOML file
Please review your TOML file to ensure the extension is configured properly. The following is an example of a TOML file that was generated for an imported marketing activity extension:
shopify.extension.toml
The following table describes the properties in the TOML file that are specific to a Marketing activity extension:
Property | Description |
---|---|
[extensions] required | Settings related to the template. Contains the following properties:
|
[extension.preview_data.types] | Types that are used with the preview endpoint. The defaults are desktop and mobile. |
[extensions.fields] required | The fields used to define the marketing activity form that's displayed to merchants in the Shopify admin. For a complete reference on the available fields, refer to marketing activities components |
Anchor to Step 3: Migrate your extensionStep 3: Migrate your extension
After you've imported the extension, you can migrate your extension by using Shopify CLI's deploy
command.
Deploying extensions using the app deploy
command also publishes the extensions. We recommend testing changes by using app dev
or deploying to a test app before deploying them to a production app.
Use Shopify CLI to deploy your extensions:
-
Navigate to your app directory.
-
Run the following command to start deploying your extensions:
#!/bin/bashshopify app deploy -
Follow the prompts.
When you receive confirmation that the deploy was successful, your extensions have been released.