dotmailer SDK
Tools to access and manage an account in the dotMailer system
|
Contact Factory - Provides functions to manage contacts More...
Public Member Functions | |
DmAddressBookCollection | ListAddressBooksForContacts (string contactEmail) |
Returns an IEmmerable interface to a list of address book that contain the specified contact | |
bool | CreateDataField (string name, DmDataFieldTypes dataType, object defaultValue) |
Creates a new data field that is used by all of the contacts | |
bool | DeleteDataField (string dataFieldName) |
Deletes the specified data field | |
DmContactCollection | ListUnsubscribedContactsSinceDate (DateTime sinceDate) |
Returns a list of contacts that have unsubscribed, since the specified date | |
DmContactCollection | ListContactsModifiedSinceDate (DateTime sinceDate) |
Retrieves a list of contacts who were modified on or after a given date. | |
DmContactCollection | ListModifiedContacts (DateTime startDate, DateTime endDate) |
Retrieves a list of contacts that were modified between two specified dates. | |
DmContactCollection | ListNewContactsSinceDate (DateTime sinceDate) |
Returns a collection of contacts that have been added to the dm account since the specified date | |
DmContact | GetContact (int contactId) |
Gets a contact based on the specified contact Id | |
DmContact | GetContact (string contactEmail) |
Gets a contact based on it's emailAddress address | |
bool | UpdateContact (IDmContact iContact) |
Updates the specified contact | |
ImportContactResult | UpdateContactsViaImport (ImportContactOptions importOptions, IEnumerable< IDmContact > contacts) |
Updates contacts that are specified in the list | |
DmContactCollection | GetImportedContacts (ImportContactResult importResult) |
Gets the contacts that were imported, using the result from the import process+ | |
DmContact | CreateNewDmContact (string emailAddress) |
Creates a new DmContact ready for use | |
DmContact | CreateContact (IDmContact contact) |
Creates a contact, from the specified interface. This will add the contact to the account, and use an api call to do so. | |
DmContact | CreateContact (string emailAddress) |
Create a contact, based on the specified emailAddress address, and adds it to the dotMailer account | |
DmSuppressedContactCollection | ListSuppressedContactsSinceDate (DateTime sinceDate) |
Returns a collection of contacts that appear in the suppression list | |
DmDataFieldValueCollection | GetDefaultEmptyDataFieldValues () |
Returns an collection of empty data field value and correspond to the data fields in the dotMailer account. | |
bool | RemoveContact (int contactId) |
Removes a contact based on contact Id | |
bool | RemoveContact (string contactEmail) |
Removes a contact from the dotMailer account | |
DmContactCollection | ListAllContacts () |
Lists all the contacts in the dotMailer account, by accessing the special 'All Contacts' address book | |
ResubscribeContactResult | ResubscribeContact (IDmContact contact, IDmAddressBook addressBook, string preferredLocale, string returnUrlToUseIfChallenged) |
Resubscribes a contact who is currently unsubscribed. Not all contacts are permitted to resubscribe. | |
SuppressionCause | GetContactStatusByEmailAddress (string emailAddress) |
Returns the current status of the contact associated with email address passed. | |
DmContactCollection | ListHardBouncingContactsWithDataFields (int campaignId, params string[] dataFieldNames) |
Retrieves a list of all the contacts that hard bounced when sent a specified campaign, including the data field values specified. | |
DmContactCollection | ListHardBouncingContactsWithDataFields (IDmCampaign campaign, params string[] dataFieldNames) |
Retrieves a list of all the contacts that hard bounced when sent a specified campaign, including the data field values specified. | |
DmCampaignContactLinkClickCollection | GetCampaignClicksForContact (int campaignId, int contactId) |
Retrieves the collection of clicks for the contact with the specified Id, for the campaign with the specified id | |
Properties | |
DmDataFieldDefinitionCollection | DataFieldDefinitions [get] |
Gets the data field definitions | |
Detailed Description
Contact Factory - Provides functions to manage contacts
Member Function Documentation
DmContact dotMailer.Sdk.ContactFactory.CreateContact | ( | IDmContact | contact | ) |
Creates a contact, from the specified interface. This will add the contact to the account, and use an api call to do so.
The ImportContactsIntoAddressBook is a safer call for adding multiple contacts
AddressBookFactory.ImportContactsIntoAddressBook
- Parameters
-
contact the IDmContact interface
- Returns
- The new DmContact
- Exceptions
-
DmException
DmContact dotMailer.Sdk.ContactFactory.CreateContact | ( | string | emailAddress | ) |
Create a contact, based on the specified emailAddress address, and adds it to the dotMailer account
- Parameters
-
emailAddress the emailAddress address
- Returns
- The new DmContact
- Exceptions
-
DmException
bool dotMailer.Sdk.ContactFactory.CreateDataField | ( | string | name, |
DmDataFieldTypes | dataType, | ||
object | defaultValue | ||
) |
Creates a new data field that is used by all of the contacts
- Parameters
-
name Name of the data field dataType Data Type of the data field defaultValue Default value for the data field
- Returns
- Exceptions
-
DmException
DmContact dotMailer.Sdk.ContactFactory.CreateNewDmContact | ( | string | emailAddress | ) |
Creates a new DmContact ready for use
- Parameters
-
emailAddress the emailAddress address of the contact
- Returns
- Exceptions
-
DmException
bool dotMailer.Sdk.ContactFactory.DeleteDataField | ( | string | dataFieldName | ) |
Deletes the specified data field
- Parameters
-
dataFieldName The name of the data field to delete
- Returns
- true if the data field was deleted
- Exceptions
-
DmException
DmCampaignContactLinkClickCollection dotMailer.Sdk.ContactFactory.GetCampaignClicksForContact | ( | int | campaignId, |
int | contactId | ||
) |
Retrieves the collection of clicks for the contact with the specified Id, for the campaign with the specified id
- Parameters
-
campaignId Id of the campaign contactId Id of the contact
- Returns
- DmCampaignContactLinkClickCollection
DmContact dotMailer.Sdk.ContactFactory.GetContact | ( | int | contactId | ) |
Gets a contact based on the specified contact Id
- Parameters
-
contactId The id of the contact of interest
- Returns
- DmContact
- Exceptions
-
DmException
DmContact dotMailer.Sdk.ContactFactory.GetContact | ( | string | contactEmail | ) |
Gets a contact based on it's emailAddress address
- Parameters
-
contactEmail The emailAddress address of the contact of interest
- Returns
- DmContact
- Exceptions
-
DmException
SuppressionCause dotMailer.Sdk.ContactFactory.GetContactStatusByEmailAddress | ( | string | emailAddress | ) |
Returns the current status of the contact associated with email address passed.
- Parameters
-
emailAddress
- Returns
DmDataFieldValueCollection dotMailer.Sdk.ContactFactory.GetDefaultEmptyDataFieldValues | ( | ) |
Returns an collection of empty data field value and correspond to the data fields in the dotMailer account.
This can be used to get the right data field value collection when implementing the IDmContact interface
- Returns
- DmDataFieldValueCollection
DmContactCollection dotMailer.Sdk.ContactFactory.GetImportedContacts | ( | ImportContactResult | importResult | ) |
Gets the contacts that were imported, using the result from the import process+
- Parameters
-
importResult
- Returns
DmAddressBookCollection dotMailer.Sdk.ContactFactory.ListAddressBooksForContacts | ( | string | contactEmail | ) |
Returns an IEmmerable interface to a list of address book that contain the specified contact
- Parameters
-
contactEmail The email address address of the contact
- Returns
DmContactCollection dotMailer.Sdk.ContactFactory.ListAllContacts | ( | ) |
Lists all the contacts in the dotMailer account, by accessing the special 'All Contacts' address book
- Returns
- DmContactCollection
- Exceptions
-
DmException
DmContactCollection dotMailer.Sdk.ContactFactory.ListContactsModifiedSinceDate | ( | DateTime | sinceDate | ) |
Retrieves a list of contacts who were modified on or after a given date.
- Parameters
-
sinceDate The earliest modification date for which to return contacts.
- Returns
- DmContactCollection
- Exceptions
-
DmException
DmContactCollection dotMailer.Sdk.ContactFactory.ListHardBouncingContactsWithDataFields | ( | int | campaignId, |
params string[] | dataFieldNames | ||
) |
Retrieves a list of all the contacts that hard bounced when sent a specified campaign, including the data field values specified.
- Parameters
-
campaignId The campaign sent to the contacts. dataFieldNames The data fields to be included in each contact.
- Returns
- A collection of contacts.
DmContactCollection dotMailer.Sdk.ContactFactory.ListHardBouncingContactsWithDataFields | ( | IDmCampaign | campaign, |
params string[] | dataFieldNames | ||
) |
Retrieves a list of all the contacts that hard bounced when sent a specified campaign, including the data field values specified.
- Parameters
-
campaign The campaign sent to the contacts. dataFieldNames The data fields to be included in each contact.
- Returns
- A collection of contacts.
DmContactCollection dotMailer.Sdk.ContactFactory.ListModifiedContacts | ( | DateTime | startDate, |
DateTime | endDate | ||
) |
Retrieves a list of contacts that were modified between two specified dates.
- Parameters
-
startDate The start date of the range. endDate The end date of the range.
- Returns
- DmContactCollection
DmContactCollection dotMailer.Sdk.ContactFactory.ListNewContactsSinceDate | ( | DateTime | sinceDate | ) |
Returns a collection of contacts that have been added to the dm account since the specified date
- Parameters
-
sinceDate The date to start the list from
- Returns
- DmContactCollection
- Exceptions
-
DmException
DmSuppressedContactCollection dotMailer.Sdk.ContactFactory.ListSuppressedContactsSinceDate | ( | DateTime | sinceDate | ) |
DmContactCollection dotMailer.Sdk.ContactFactory.ListUnsubscribedContactsSinceDate | ( | DateTime | sinceDate | ) |
Returns a list of contacts that have unsubscribed, since the specified date
- Parameters
-
sinceDate the start date
- Returns
- DmContactCollection
- Exceptions
-
DmException
bool dotMailer.Sdk.ContactFactory.RemoveContact | ( | int | contactId | ) |
Removes a contact based on contact Id
- Parameters
-
contactId id of the contact to remove
- Returns
bool dotMailer.Sdk.ContactFactory.RemoveContact | ( | string | contactEmail | ) |
Removes a contact from the dotMailer account
- Parameters
-
contactEmail emailAddress address of contact
- Returns
ResubscribeContactResult dotMailer.Sdk.ContactFactory.ResubscribeContact | ( | IDmContact | contact, |
IDmAddressBook | addressBook, | ||
string | preferredLocale, | ||
string | returnUrlToUseIfChallenged | ||
) |
Resubscribes a contact who is currently unsubscribed. Not all contacts are permitted to resubscribe.
- Parameters
-
contact The contact you wish to resubscribe. Any custom data in this object will be added as well. addressBook The book to add the contact to (if the contact is challenged, they'll only be added after responding to the challenge) preferredLocale The locale of the contact (such as en-GB or en-US). If the one supplied isn't available in dotMailer, it will fall back to en-GB. returnUrlToUseIfChallenged If the contact is challenged before being permitted to resubscribe, this is the page they'll end up on if they successfully complete the resubscribe.
- Returns
- ContactAdded, ContactChallenged or ContactCannotBeUnsuppressed
bool dotMailer.Sdk.ContactFactory.UpdateContact | ( | IDmContact | iContact | ) |
Updates the specified contact
WARNING -> Will use an api call for each contact
- Parameters
-
iContact interface to the contact information
- Returns
- Exceptions
-
DmException
ImportContactResult dotMailer.Sdk.ContactFactory.UpdateContactsViaImport | ( | ImportContactOptions | importOptions, |
IEnumerable< IDmContact > | contacts | ||
) |
Updates contacts that are specified in the list
Creates a temporary address book, imports the contacts, deletes the address book
- Parameters
-
importOptions ImportOptions contacts IEnumerable interface to list of contacts to add
- Returns
Property Documentation
|
get |
Gets the data field definitions
Generated by 1.8.3