[SalesForce] How to Retrieve & Deploy Salesforce Lightning Theme using metadata api

We created a custom Lightning Theme (Setup > User Interface > Themes and Branding) in the sandbox and have to push it to another org using Metadata API.

We were able to retrieve Branding Set from Source Org by specifying below in package xml, however, when we deploy the same to Target org (Specified in package xml & Branding Set folder is available in src), it doesn't show up in the Target org.

<types>
    <members>LEXTHEMINGMy_Theme</members>
    <name>BrandingSet</name>
</types>

Do you know the right way of deploying Themes & Branding using metadata API?

Based on the Answer below, I used following package XML to retreive all the components related to my Lightning theme

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>ThemeName</members>
        <name>BrandingSet</name>
    </types>
    <types>
        <members>ImageName</members>
        <members>BG_ImageName</members>
        <name>ContentAsset</name>
    </types>
    <types>
        <members>ThemeName</members>
        <name>LightningExperienceTheme</name>
    </types>
    <version>43.0</version>
</Package>

Best Answer

Add this to your package and this will work:

<types>
    <members>YourThemeHere!!!</members>
    <name>LightningExperienceTheme</name>
</types>

If you don't know what your theme name is, you can reference it by checking what's in the masterLabel tab within your brandingSet xml file.

I had the same problem and found the solution by searching the metadata within the workbench. https://workbench.developerforce.com/login.php

Related Topic