Community Deployments: Duplicate Priority Values

When deploying a Community (Experience Cloud) with Audiences, we sometimes get an error like this:

Remove duplicate priority values.Details:Personalization Target Info ID - 6At3C000000HaltSAC,Target Type - ExperienceVariation,Target Value - Home_Theme_Navigation_Menu_3_Component_Properties,Group Name - 3f555c74-248d-4f2c-a8b2-5d27fc4814c0$#$7be51a96-6390-4437-99f0-d1e9072649a7,Publish Status - Draft,Group Priority - 9

What's going on here is that the priorities you set in your Audiences are stored across the Audience files. You'll see in the Audience that there are multiple target nodes:

        <target>
            <groupName>ecdea109-1ddb-4b66-9452-ebc43120220b$#$7dce6e95-ba15-4481-bb64-e6fd08f79488</groupName>
            <priority>1</priority>
            <targetType>ExperienceVariation</targetType>
            <targetValue>2023_Home_English_Section_Component</targetValue>
        </target>

 The short answer to this one:

Include all your Audiences in the deployment.

The long answer:

Across all your Audiences, there cannot be a duplicate value for Priority for that Group. In the above example, priority #1 for Group ending -e6fd08f79488 is this target. You will get this error if there is another Audience for that Group with Priority 1.

To fix this manually, you have to find the duplicate from your Audiences. On a Mac, if you have git installed locally, you can search /audience with the following:

grep "e6fd08f79488" -R -A 1 .

This will give you all the audience files containing "e6fd08f79488" and the following line (the -A 1 part) which will show you the priority.

Once I identify the duplicate, I go into the promotion branch in git and update the value to remove the duplicate.

Comments

Popular posts from this blog

Setting a DateTime to a Weekday in a Formula

"Disjunctions not supported" - Why Custom Metadata and Flow Don't Mix

Update Knowledge Articles in Bulk