There are a few parameters the Platform SDK looks for when determining whether to update a current Template or create a new one in your Dashboard. Uploading a Sheet from the Platform SDK takes the sheet input parameters you’ve provided and looks for a Template with a matching namespace, sheet name, teamId, and environment (test or prod).
If no Template is found, this method creates a new Template with all of the input parameters, checks to see if there are any linked sheets in the workbook deployment that should be linked to this Template and links them properly then returns the Template.
If a Template is found, then the method checks that the user has access to the Template and if so, creates a new sheet version then returns that Template. When creating a new sheet version, the API checks to see if the Data Hook® code has been modified and if so, deploys a new Data Hook version as well. It also checks to see if the jsonSchema for the Template has been modified, and if so it creates a new version of the Template. Otherwise, it updates the name, archived, jsonSchema, previewFieldKey, sheetCompute and deploymentId to the input params values then saves the Template. Please note: if field hooks or record hooks have been modified but nothing else on the sheet, a new template will not be created. Only the associated Data Hook record will be modified.