How to set Territories with trigger of ZOHO CRM New/Update Deal Entry?

How to set Territories with trigger of ZOHO CRM New/Update Deal Entry?

Hi.

How to set Territories with trigger of ZOHO CRM New/Update Deal Entry?
I did set value using territoryID and territory name, but I couldn't set.