The CreateDataField method can be used to create a data field within your dotMailer account.
This is useful if you will need to dynamically create and store values within dotMailer relating to a contact.
Guidance Notes
You cannot create a datafield that already exists, if you are unsure which datafields currently exist please call ListContactDataLabels. The Data fields fieldName can only be up to 20 characters in length and must consiste of hyphens, underscores, and alphnumeric characters only. The data field that is created will be private by default. The amount of data fields you can create will be limited by the account type you have.
Parameters
| username |
string |
This is the username from your API key. It is in the format of an email address and will look similar to apiuser‑908709770324@apiconnector.com |
required |
| password |
string |
This is the password from your API key. |
required |
| fieldname |
string |
This is the name of the data field you want to create. |
required |
| dataType |
|
This is the type of data that the data field will store. The possible values are String, Numeric, Date or Boolean. |
required |
| defaultValue |
|
This is the default value you would like the data field to store. |
optional |
Return values
None.