Has anyone had issues with contacts created via the xConnect API not enrolling in marketing automation plans?
We've created a custom job which pulls in contact information from an external source and adds it to xDB via the xConnect API. We're using a custom Source for the identifiers and setting a bunch of custom facets (as well as some OOB ones), and that all works fine. I can see the contacts coming up when I search for them using segments and lists. Great.
However those contacts don't seem to want to enroll in any marketing automation plans. If I use List Manager to upload a contact with the same data, they are added to the MA plan, however if the contact was added by our custom code, they're not.
My guess is I'm doing something wrong when I add my contacts. The code looks something like:
// variables 'source' and 'identifier' are passed in earlier
XConnectClientConfiguration cfg = GetXConnectConfiguration();
using (var client = new XConnectClient(cfg);)
{
if (!string.IsNullOrEmpty(source) && !string.IsNullOrEmpty(identifier))
{
var contact = new Contact(new ContactIdentifier(source, identifier, ContactIdentifierType.Known));
client.AddContact(contact);
}
}
Am I missing anything extra around the ContactIdentifier
? I've noticed when I look in my shard DBs that contacts imported via the list manager have entries in the ContactIdentifiersIndex
table, but the ones I've added don't.
These are the records in the ContactIdentifiers
and ContactIdentifiersIndex
tables for a contact imported via list manager:
And these are the records for one of the contacts created via the xConnect client:
Has anyone else faced this issue before? It might be nothing to do with how I'm creating the contacts, but it just seemed like the only difference I could find.