3

In Community Builder, if you create audiences and assign them to page variations, you cannot deploy these using change sets, according to Considerations for Deploying Communities with Change Sets. In fact, Audience doesn't even appear in the list of change set components.

On the other hand, Audience metadata can be deployed using the ant migration tool, so I was hopeful that the audience assignments would also be deployable.

Unfortunately, I haven't had success in deploying any audience assignments, either for entire pages or for components on a page. Has anyone found a workaround for deploying audience assignments for Community Builder pages? I should say that I'm using the Build Your Own template.

If it can't be deployed, is there at least a way to get a list of audience assignments so I don't have to open every single page in the Community Builder to check?

Here's what I'm using in my package.xml manifest. All the community builder page variations and all the audiences are created correctly, but the assignments are not.

<types>
    <members>*</members>
    <name>Audience</name>
</types>
<types>
    <members>*</members>
    <name>CustomSite</name>
</types>
<types>
    <members>*</members>
    <name>SiteDotCom</name>
</types>
8
  • just to clarify, you mean a page variation with its assigned audience?
    – glls
    Commented May 6, 2019 at 21:49
  • Yes, a page variation with its assigned audience, but also an assigned component within a page. I've edited my post to include that. Commented May 6, 2019 at 23:00
  • @DavidCheng did you manage to deploy audiences with their assignments? I've found that assignment can be found in Audience xml file, under <target> tag as it is here: developer.salesforce.com/docs/atlas.en-us.api_meta.meta/… Unfortunately, I can't retrieve this target and I'm wondering if someone has successfully deployed audiences with assignments.
    – jm.
    Commented Dec 18, 2019 at 14:16
  • @jm.No I had to recreate all the assignments manually. Commented Dec 18, 2019 at 14:52
  • did you try experience bundle developer.salesforce.com/docs/atlas.en-us.communities_dev.meta/…
    – sdandamud1
    Commented Jan 22, 2020 at 15:06

2 Answers 2

1

@DavidCheng, @EnrikHysko, just wanted to share my findings. ExperienceBundle does not help with audience assignments. But with metadata api (ant deployment) the audience and assignments can be migrated. The 'Audience' metadata type in the package.xml works.

<types>
    <members>*</members>
    <name>Audience</name>
</types>

The target tag in the retrieved components have the assignment related details and gets deployed to the target environment. Hope this helps.

2
  • Please include an example of the package.xml for the Audience metadata type.
    – Dave Humm
    Commented Nov 18, 2020 at 10:14
  • @DaveHumm, added the example package.xml in my answer.
    – bgOnCloud
    Commented Dec 1, 2020 at 10:35
1

Adding to this old thread for posterity because by golly, this one is esoteric.

The priority of an Audience is in the definition of the Audience (in audience/) in the targets node.

<target>
    <groupName>3e398530-ec64-4c56-8ff7-afa8ab3343ad</groupName>
    <priority>5</priority>
    <targetType>ExperienceVariation</targetType>
    <targetValue>Search_2023_Search_French_Belgium_Page</targetValue>
</target>

The groupName corresponds to the ID of the route in the ExperienceBundle. "Group" here is the common parent ID of the Page Variations. So the node above indicates that within group 3e398530-ec64-4c56-8ff7-afa8ab3343ad, the variation Search_2023_Search_French_Belgium_Page is priority 5. enter image description here

Additionally, the targetValue will tie to the developerName node of the relevant variation in the ExperienceBundle.

There is also a table that you can query with ordinary SOQL called PersonalizationTargetInfo. This ties the Variation to the Group again, plus the ContainerId (your Community's Network ID) and a draft status. The exact purpose of this table ... I'm not sure.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .