How to retrieve and deploy territory-based sharing rules using ANT tool in Salesforce?

How to retrieve and deploy territory-based sharing rules using ANT tool in Salesforce?

SharingTerritoryRule should be used to retrieve Territory Sharing Rules.
 
package.xml:
<?xml version=”1.0″ encoding=”UTF-8″?>
<Package xmlns=”http://soap.sforce.com/2006/04/metadata”>
    <types>
        <members>*</members>
        <name>SharingTerritoryRule</name>
    </types>
    <version>52.0</version>
</Package>

Leave a Reply