Migrate app extensions to Shopify CLI
If your app has extensions that you managed in the Partner Dashboard, then you manage them with Shopify CLI from now on. Complete these steps before your next deploy. Your current installations keep working in the meantime.
For everything else that moved from the Partner Dashboard, refer to Migrate from the Partner Dashboard.
Anchor to Update Shopify CLIUpdate Shopify CLI
Update to the latest version of Shopify CLI.
Anchor to Migrate dashboard-managed extensionsMigrate dashboard-managed extensions
You can no longer create or manage app extensions in a dashboard. You create and manage extensions with Shopify CLI.
You can no longer create or manage app extensions in a dashboard. You create and manage extensions with Shopify CLI.
Anchor to Extensions affectedExtensions affected
The following extension types, which were managed in the Partner Dashboard, need to be migrated. Refer to the documentation for each extension type:
| Extension type | Description | Documentation |
|---|---|---|
| Admin links | Deep links, app navigation, and custom bulk operations from the Shopify admin | Create admin link extensions |
| Flow lifecycle events | Flow trigger usage notifications | About Flow development |
| Flow actions | Shopify Flow integrations for actions | Create a Flow action |
| Flow triggers | Shopify Flow integrations for triggers | Create a Flow trigger |
| Marketing activity extensions | Marketing campaign integrations | Migrate marketing activity extensions |
Anchor to Use CLI-managed app configurationUse CLI-managed app configuration
CLI-managed app configuration from your shopify.app.toml is always included when you run shopify app deploy and shopify app dev. Shopify CLI automatically removes the include_config_on_deploy property from your shopify.app.toml file.
If your shopify.app.toml isn't up to date with the values in your dashboard, then use shopify app config link.
If you see unexpected configuration changes when running shopify app deploy, then
your shopify.app.toml might not be up to date with values set in your dashboard.
If you see unexpected configuration changes when running shopify app deploy, then
your shopify.app.toml might not be up to date with values set in your dashboard.
Learn more about managing app config files.
Anchor to Migrate to extension user identifiersMigrate to extension user identifiers
All extensions need to include user identifiers in the uid field of their shopify.extension.toml.
When deploying a Shopify app, we need to be able to reliably determine which extensions have been added, updated, and removed from your app. This means that we need to map extension code to our records of your extensions on Shopify.
To achieve this, app extensions are idenitified by extension user identifiers (UIDs) that are set in the shopify.extension.toml file. Extension UIDs are unique, source-defined, and app-scoped, so they can be shared across production, staging, and development apps.
By default, UIDs are automatically added when you create a new extension using shopify app extension generate, or when you run shopify app deploy. UIDs are deterministic based on the extension handle, so they will always be the same for extensions with the same app handle value.
Non-interactive deploys (shopify app deploy --allow-updates) and the shopify app dev command fail until you've completed these steps.
The uid is different from the extension identifiers in the .env file, which shopify app deploy previously generated.
After you map uid values during app deploy, the .env extension identifiers are no longer used, and uid values can
be shared across all copies of your app.
The uid is different from the extension identifiers in the .env file, which shopify app deploy previously generated.
After you map uid values during app deploy, the .env extension identifiers are no longer used, and uid values can
be shared across all copies of your app.
Anchor to Create and map ,[object Object], valuesCreate and map uid values
uid valuesYou need to run a one-time interactive deploy to create and map uid values:
- Run
shopify app deployagainst a code branch that represents the current release of your app.- Shopify CLI generates a new
uidvalue for each extension, based on the extensionhandle, and writes it to theshopify.extension.tomlfile. - In the confirmation prompt for the
deploy, Shopify CLI indicates that all your extensions areupdated.CautionRemoving and adding an extension can result in data loss on installed stores. If you see extensions that are
newandremoved, instead ofupdated, then the extension failed to map. Update the extensionhandleor.envenvironment variable to match the extension on Shopify.Caution:Removing and adding an extension can result in data loss on installed stores. If you see extensions that are
newandremoved, instead ofupdated, then the extension failed to map. Update the extensionhandleor.envenvironment variable to match the extension on Shopify. - Select
Yesto confirm the deploy and release of the app. - Shopify sets the
uidvalues as the identifiers for your extensions.
- Shopify CLI generates a new
- Commit the new
uidvalues to your source control. - For each additional app instance:
- Merge the new
uidvalues into the appropriate code branch for the app instance. - Run
shopify app deploy --config <name>to map the sameuidvalues to the app instance.
- Merge the new
Anchor to How extensions are mapped to ShopifyHow extensions are mapped to Shopify
During uid mapping, Shopify CLI uses the following logic to map extensions to Shopify:
- Identify the active
.envfile for the current app configuration. For example:- If
shopify.app.tomlis active, then.envis used. - If
shopify.app.prod.tomlis active, then.env.prodis used.
- If
- Look for an extension identifier in the
.envfile for the current app configuration, based on the extensionhandle. The environment variable is namedSHOPIFY_<HANDLE_SNAKE_CASE>_ID. For example:- If the extension
handleisdiscount, then the environment variable isSHOPIFY_DISCOUNT_ID. - If the extension
handleisproduct-reviews, then the environment variable isSHOPIFY_PRODUCT_REVIEWS_ID.
- If the extension
- If an extension identifier isn't found in
.env, then match on the extensiontypeandhandle. - If no match is found, then Shopify CLI prompts for any potential matches.
Before the Dev Dashboard migration, the shopify app deploy command populated these .env files. If an .env file isn't
available for your app configuration, then update extension handles to match their values on Shopify.
Before the Dev Dashboard migration, the shopify app deploy command populated these .env files. If an .env file isn't
available for your app configuration, then update extension handles to match their values on Shopify.
After this initial deploy, Shopify CLI uses only the uid value to determine whether it creates, updates, or deletes an extension.
Anchor to Next stepsNext steps
- Learn about app configuration with Shopify CLI.
- Monitor app performance to find the metrics and logs that replaced the Partner Dashboard's app insights.
- Migrate from the Partner Dashboard to find everything else that moved.