Dependent metadata for prompt template deployment
Key Takeaway
Before you deploy a prompt template, plan for what it depends on. Deploy its flow with it or before it. If it uses a custom LLM configuration, the target org needs a model with the same name. If it uses an Einstein Search retriever, create the retriever by hand in the target org first.
A prompt template often relies on other metadata, such as a flow that feeds it data, an Einstein Search retriever, or a custom large language model (LLM) configuration. When you move a prompt template from sandbox to production, each of these dependencies needs its own planning. You must deploy some with the prompt template and some before it, and you must rebuild some by hand in the target org.
Ways to deploy a prompt template
You can deploy a prompt template in a package, in a change set, or with the CLI. Each method has its own limits for dependent components, so check what the prompt template uses before you pick one.
- Packages: you can use managed, unmanaged, or unlocked packages.
- Change sets: when you build a change set for a prompt template, add all the resources first, and then add the dependencies. You can't delete a prompt template through a change set.
- CLI: to deploy a prompt template with the CLI, the prompt template must have at least one template version.