I am trying access the Audience Manager Contacts in my DXA .Net application.
I have followed the steps from SDL docs and able to create contacts using CME in Web 8 and also able to synchronize the contacts with the Subscription Management
table using the Synchronize end Point micro service.
I have referenced the following two DLLs in the DXA Web site project to use the Audience Manager functions
Sdl.AudienceManager.ContentDelivery.dll
Tridion.OutboundEmail.ContentDelivery.dll
When trying to instantiate the Sdl.AudienceManager.ContentDelivery.Profile.Contact
object. I am getting the following exception:
Unable to determine the current Publication. Please make sure the Ambient Data Framework is running, or configure a DefaultPublicationId in the cd_audience_manager_conf.xml configuration file
I have installed the Ambient framework in the Session enabled Content Service. Is there any config file I need to add in the DXA solution as per Tridion 2013 SP1 or the discovery service will handle this?
Please help!
Edit 1
I have modified and added the cd_Audience_Manager_Conf.xml
in the DXA.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="8.1">
<Email>
<OpenImage>MailOpened.gif</OpenImage>
</Email>
<Redirect>
<ErrorResolvingLink>Resolve.html</ErrorResolvingLink>
<ErrorResolvingBinary>Empty.gif</ErrorResolvingBinary>
<GeneralError>Error.html</GeneralError>
<AppendTrackingInfo>false</AppendTrackingInfo>
</Redirect>
<AmbientData>
<CacheDuration>300</CacheDuration>
</AmbientData>
<Publications>
<Publication Id="27">
</Publication>
</Publications>
</Configuration>
Apart from that I also tried to add cd_storage_conf.xml
and the jars in the bbin\Lib folder in the DXA solution
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="8.1">
<Global>
<Storages>
<StorageBindings>
<Bundle src="AudienceManagerDAOBundle.xml"/>
</StorageBindings>
<Storage Id="profiledb" Class="com.tridion.storage.persistence.JPADAOFactory" Type="persistence" dialect="MSSQL">
<Pool CheckoutTimeout="120" IdleTimeout="120" MonitorInterval="60" Size="5" Type="jdbc"/>
<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
<Property Name="serverName" Value="WSV001704"/>
<Property Name="portNumber" Value="1433"/>
<Property Name="databaseName" Value="tridion_submgmt"/>
<Property Name="user" Value="TMSSMUSER"/>
<Property Name="password" Value="Tridion!232!"/>
</DataSource>
</Storage>
<Storage Id="trackingdb" Class="com.tridion.storage.persistence.JPADAOFactory" Type="persistence" dialect="MSSQL">
<Pool CheckoutTimeout="120" IdleTimeout="120" MonitorInterval="60" Size="5" Type="jdbc"/>
<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
<Property Name="serverName" Value="WSV001704"/>
<Property Name="portNumber" Value="1433"/>
<Property Name="databaseName" Value="tridion_tracking"/>
<Property Name="user" Value="TMSPSUSER"/>
<Property Name="password" Value="Tridion!232!"/>
</DataSource>
</Storage>
</Storages>
</Global>
<!-- Audience Manager type mappings -->
<ItemTypes defaultStorageId="defaultFile">
<Item typeMapping="AudienceManagerProfile" storageId="profiledb"/>
<Item typeMapping="AudienceManagerTracking" storageId="trackingdb"/>
</ItemTypes>
<License Location="c:\SDLWeb\cd_licenses.xml"/>
</Configuration>
still I am getting the same error. Is there any other work around?