Hi T-Q,
The device name prompter action can be the first action in the template and will work properly.
Reference the following document regarding using naming templates (may be helpful):
You can install programs by adding "Distribute Software" actions to the system configuration area of the template.
Best Regards,