Recently we’ve been working with DXA 1.6 and Audience Manager in a Web 8.5 implementation. We’ve had trouble getting our contacts to save. Now we know why it wasn’t working.
Below is what we have in our Apicontroller inside of a GetPageModelByUrl()
method:
SMWTridionProfile tridionProfile = (userId != null) ? FindTridionProfile(userId, localization.LocalizationId) : null; if (tridionProfile != null) { AmbientDataContext.CurrentClaimStore.Put(AudienceManagerClaims.AudienceManagerContact, tridionProfile.Id.ToString(), ClaimValueScope.Session); } else if(tridionProfile == null && userId != null) { tridionProfile = SaveInitialContact(userId, addressBookIdParam, localization.LocalizationId); AmbientDataContext.CurrentClaimStore.Put(AudienceManagerClaims.AudienceManagerContact, tridionProfile.Id.ToString(), ClaimValueScope.Session); }
Our issue, specifically, is with SaveInitialContact()
. SDL has now reported that there is potential reason that this method is the problem:
- DXA 1.6 was released before SDL Web 8.5
- DXA 1.6 uses Content Interaction Library (CIL) 8.3
- DXA 1.7 came out after SDL Web 8.5
- DXA 1.7 uses the 8.5 CIL
So, if you’re running DXA 1.6 on Web 8.5 and you’re using audience manager, SaveInitialContact()
won’t work as I’ve illustrated above.
But this leaves a much bigger question
If you’re using DXA 1.6 on Web 8.5, how should you use SaveInitialContact()
?
I’m open for ideas.