In order to achieve the use case described above, we are going to use two available features i.e. Template Properties and shared component of product.
Please find design steps below:
1: First we are going to create an empty template with respective property which we want to use. For example in this case we are going to use two Template property i.e. ApplicationName & PolicyType whose value will be dynamic and will change for each deployment plan.
2: Once we have our template property been identified and defined now we are going to create our shared component, so we can reuse this component in any applications. In this shared component we are just going to use an action "ROC - Get Deployment Property Value" twice as we want to get the two template property, knitted together in a flow. The configuration and layout of shared component looks as below.
3: Once designing of shared component is finished commit the same and assign that version of it to an application where you want to use it.
4: Now in pre-plan step assign the flow of this shared component as one of the initial actions so that it can fetch out the values been passed. Also the same can be assigned to any deployment step and they to will be getting the values from template property.
5: Now map these processes to your template and with this design the deployment plan created via template will be dynamic. Now what value been set to template property during creation of deployment plan will be passed and shared across the deployment.
6: Another advantage of above design is that now deployment plans can be created via REST API passing appropriate value of template properties. Sample request below.
"deploymentPlan":"custom run from REST",
"project":"Custom Plan from template properties",