the "ThingName" is a service parameter and reused to substitute the name aspect of the params JSON.
You can either set it explicitly or use variables. As long as the parameter is passed correctly to the CreateThing service, it doesn't matter if it's set directly in the params or added later on - but it has to be part of the parameters once the CreateThing service is called.
I have used the ThingName as service parameter and not hardcoded, as I can create dynamic named Things with it - and the name will be used multiple times during the service call, e.g. to call the GetConfigurationTable service.