Creating and Editing a Template
In order to create or edit templates in Marketplace a user must be at least of Poweruser level. This means they’re most likely on one of the data, engineering, solutions or analytics team and know how to create scripts in one of the four languages (Python, Node.Js, Bash or Rscripts) supported by Marketplace.
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%203.22.57%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
Creating a template is the same as setting up a custom pallet the only required field is the name. The code in a Template fshould be sourced from a PMG github repo but just for creation it does not have to be. When initially creating a template the state has to be Draft, to be moved to Enabled either Internal or External there is QA process of the Template and the code.
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%203.23.13%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
Insert your code here by either linking a repo, copying the code directly into the text reader or by uploading a zip folder.
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%203.29.30%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%203.29.49%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
You can add template variables, variables that are client and user specific. These variable types can selected from this list.
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%204.14.23%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
The only requirement is if using anything sensitive use the Password variable. When naming them to pass these variables into the script you must reference them in the command line. The command line. So for example if you have a template variable named example you have to reference it in the command line as FORKLIFT_TMPLVAR_EXAMPLE
(if you use spaces in your template variable name when referencing them in the command line or code you’ll have to use _
).
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%204.29.02%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%204.29.14%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
The command line is how the script is executed in Marketplace. If inserting Python code directly or using a zip file that initials on script.py
the above command line is appropriate. If you're linking to a github repo or any more intricate code you’ll have to change the command line to reflect that. The command line is just a comma separated Bash command line so anything you can put into your terminal (besides downloading dependencies) you can put here. For package dependencies (only available for Node, Python and R) use the package form input.
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%204.47.47%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
just name the package and put the version needed and Marketplace will install it before running your script. The final part of creating a Template is Environment Variables. This is variables you don’t wish to hard code into your script for testing but need in every version of the script in Marketplace. Self explanatory just put the name and value here.
![](../../__attachments/2898886873/Screen%20Shot%202023-05-23%20at%204.50.43%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
Presto you created a template! You can edit it by looking it up in the templates table here.