Contact

Contact is created on the CXPerium => CRM => Contacts menu when a new user sends message to your WhatsApp number.

Details of the Contact object is available on CXPerium.Models.Contact namespace.

Another important point of Contact object is that you can hold custom values with CustomFields attribute inside your Contact object along with default attributes.

An example of WhatsApp.cs GetContactByPhone method, using CustomFields.

public override Contact GetContactByPhone(
    string phone,
    string profileName,
    Dictionary<string, string> attributes
)
{
    var contact = base.GetContactByPhone(phone, profileName, attributes);

    contact.CustomFields.Add("key", "value");

    return contact;
}

Last updated