1

Suppose I have a Mail column and custom column like Brand. And these both fields are used to uniquely defined the contact. Now we have both keys then how this method will get the correct contact. Contact.GetFromContactIdentificatonKeys(new string [] { "[email protected]", "brand" }); How system will recognize that first one is Email and second one is brand?

1 Answer 1

3

Quoting the "SDL Tridion 2013 SP1 Outbound E-mail Content Delivery .NET API.chm" help file:

A list of contact identification values. The values must be in the same order as their respective fields are specified in the configuration file.

Looking at my config file which is in /config/OutboundEmail.xml I see:

<ContactDetail name="IDENTIFICATION_KEY" enableSearch="false" isIdentificationKey="true">
     <Label>Identification key</Label>
     <Label language="1033">Identification key</Label>
  </ContactDetail>
  <ContactDetail name="IDENTIFICATION_SOURCE" enableSearch="false" isIdentificationKey="true">
     <Label>Registered via</Label>
  </ContactDetail>

Which basically means you will need to pass a string array with the as many values as the number of fields declared as Identification keys (attribute isIdentificationKey="true"), and in the order you see in the config file.

For instance in my case, it is exactly what you mentioned: Contact.GetFromContactIdentificatonKeys(new string [] { "[email protected]", "sdl" });

Update:

The order of the field is actually managed at the database level, despite what the documentation says. So look at the order of these identification fields in the Tridion_cm_email db in the CONTACTS_EXTENDED_DETAILS table for the CM side, and make sure the fields are in the same order and identical to the ones in CD's database Tridion_submgmt, same table name. (the database names may be different on your system)

2
  • 2
    That configuration file is actually for the CM, but it still works because the CM+CD databases have to be identical. I'd say the documentation should actually say 'database' instead of 'configuration' since the configuration doesn't actually dictate the order. Commented Feb 27, 2015 at 12:35
  • Good to know thanks. will update the answer Commented Feb 27, 2015 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.