From my web 8 CLI - enabled web application I get the following error when trying to load in an Audience Manager contact:
Unable to find Audience Manager target with Name: '3'.
In my Discovery Service cd_storage_conf.xml there is the following:
<Role Name="AudienceManagerCapability">
<Targets Name="AudienceManagerTargets">
<Target Name="3" Url="http://myserver:8091/audiencemanager.svc" Active="True" />
</Targets>
</Role>
Where the 3 matches the id of the Sync Target URI created in the CMS (as explained in the docs)
It seems like it is able to find the target in the discovery config (hence the error message containing the target id), but what is it then using this id for further? Surely it is enough to then just know the audience manager service endpoint. Also, what if there are multiple targets, how does Tridion known which target to use for a given context? I miss the bigger picture here - is there somewhere in the docs where it explains how this all fits together in the web 8 architecture?
UPDATE:
So I fixed the error - it seems that whoever last updated the config did not run an update
java -jar discovery-registration.jar update
I'm still not 100% sure how it all fits together, but the main thing for now is that it works.