Migrate legacy Flow extensions
If you have existing Flow extensions that were created through the Partner Dashboard, then you can import these extensions into your codebase. After you deploy the extensions that you’ve imported into Shopify CLI, Shopify CLI manages those extensions going forward.
A handle
property is created in the extension's TOML configuration file after running the import command. Note that you can't change the handle
property of the extensions that are present in your app's codebase after you've run the dev
or deploy
commands.
Anchor to RequirementsRequirements
- Create a Partner account.
- Scaffold an app that uses Shopify CLI v3.70.0 or higher, or migrate your existing app so it's compatible with Shopify CLI v3.70.0 or higher.
- Migrate a Partner Dashboard-managed app.
Anchor to Step 1: Import your Flow task extension locallyStep 1: Import your Flow task extension locally
The command in this procedure only generates the local file representation of your Partner Dashboard extensions. Running the deploy
command migrates your extensions to CLI managed-extensions. You can only import extensions that have versions. The published version is imported, if one exists. Otherwise, the latest version is imported.
-
Navigate to your app directory.
-
To start importing your Flow extension, run the following command:
#!/bin/bashshopify app import-extensions -
Select the
Flow Extensions
option. -
Select an extension from the list of extensions that are available to import.
After you’ve selected the extension to import, Shopify CLI automatically generates the file representation in your application’s /extensions
directory and displays a success message.
You can then go into your application’s /extensions
directory and start editing your extension. The file structure of your extension should look like the following:
To learn more about the extensions file structure, refer to App structure and the documentation for your extension type.
Anchor to Available FlagsAvailable Flags
Anchor to [object Object]client_id
client_id
An application’s client_id
. The ID enables you to target a specific application when running the import command.
Terminal
Anchor to Step 2: Migrate your extensionStep 2: 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 extension(s):
- Follow the prompts.
When you receive confirmation that the deploy was successful, your extensions have been released.