I have a Salesforce Service enabled Sandbox and I have created some messaging templates in Service Setup/Home/Channels/Messaging/Messaging Templates. I need to retrieve metadata related to those Templates to vs code using sfdx. How can I modify my package.xml to achieve that?
Since it seems that it is not supported by Metadata API, I have found a workaround, with Workbench I queried object Messaging Template:
SELECT DeveloperName,MasterLabel,Message FROM MessagingTemplate
Then in VS Code, exported that result as a JSON file and imported on my other sandbox.
sfdx force:data:tree:export -q "<SOQL query>" -d "<exported file path>" sfdx force:data:tree:import -f "<exported file path>"
Add the MessagingTemplate object to your package:
<types> <members>*</members> <name>MessagingTemplate</name> </types>