This document creates a new outbound email in Informz using Mailing Designer 2 (MD2).
A message can have one or more stories within it. Once the mailing has been created, it can be published to email recipients using the ScheduleMailing action.
Case sensitivity and order
The document tags are case sensitive. Make sure that the case sensitivity is respected between the calling application and API. For example, <BulkUpload> is correct but <bulkupload> is not.
However, the comparison of string values in a grid request is not case sensitive.
The order that nodes are presented within an XML document are determined by the XSD. Use the example messages provided and the graphical depiction of the XSD to ensure that the node order in the documents being submitted to the Informz API match the order as found in the XSD.
CreateMessage
The example below illustrates a message comprising three stories. There can be an HTML version and a text version of each story. Include all relevant HTML for the HTML version, including external links to URLs and images.
Request
<ActionRequest xmlns="http://partner.informz.net/aapi/2009/08/">
<Password>nadya@test.com1</Password>
<Brand id="2063">Brand Name</Brand>
<User>nadya@test.com</User>
<Actions>
<CreateMessage>
<Name>Nadya test api</Name>
<FriendlyFrom>Pineview Registrar</FriendlyFrom>
<EmailFrom>ntest@higherlogic.com</EmailFrom>
<ReplyTo>registrar@pineview.edu</ReplyTo>
<Subject>Exciting new fall courses</Subject>
<TemplateID>670</TemplateID>
<FolderName>Bla</FolderName>
<MessageStories>
<MessageStory>
<Title>Title1</Title>
<HtmlContent>HtmlContent1</HtmlContent>
<TextOnlyContent>TextOnlyContent1</TextOnlyContent>
<MessageContentArea>TitleMCA</MessageContentArea>
</MessageStory>
</MessageStories>
</CreateMessage>
</Actions>
</ActionRequest>
Details
Node | Type | Req'd | Unique | Description |
---|---|---|---|---|
<EmailFrom> | String | False | False | The sender’s email address. |
<FolderName> | String | False | False | The folder in which the message will be created. |
<FriendlyFrom> | String | False | False | The display name associated with the sender’s email address. |
<HTMLContent> | String | True | False | The message content to be sent to the recipients. |
<Name> | String | True | False | Descriptive name for the message. |
<MessageContentArea> | String | True | True | Unique name of message content area. |
<MessageStories> | True | False | ||
<ReplyTo> | String | False | False | The email address to send replies to. |
<Subject> | String | True | False | The message's subject line seen by the recipient. |
<TemplateID> | Int | False | False | The template to use for this message. |
<TextOnlyContent> | String | False | False | The text version of the message content. If this is not provided, Informz will generate a text version from the supplied HTML content. |
<Title> | String | True | False | A single story’s title. |
Notes
- A CreateMessage is creating only a message (Mailing Designer 2.0).
- HTML formatting characters (like '<') have to be replaced with XML encoded equivalents (like '<')
- Personalization (i.e., "mail merge") field names can be embedded in <HTMLContent> and <TextContent>. These fields must have '%%' on either side of the name. These personalization field names will subsequently be used in the Headers section of the SubscriberData portion of the corresponding PublishMailing ActionRequest document. The matching data for each subscriber also appears in SubscriberData. (See below for an example.)
- Any hyperlinks must be validated by the user.
- Any images must be validated by the user. (Images are not hosted by Informz.)
- If no <FolderName> is supplied, the mailing will be created in the main folder for the brand.
- If the supplied <FolderName> has been deleted, an exception will be raised.
- If supplied <FolderName> does not exist, folder with this name will be created.
- If no <TemplateID> is supplied, the mailing will use the default template for the brand.
- If one of <EmailFrom>, <FriendlyFrom>, and <ReplyTo> is supplied, they all must be supplied. If they are omitted, that envelope information will be taken from the template associated with the mailing.
Response
<?xml version="1.0" encoding="utf-8"?>
<ActionResponse xmlns="http://partner.informz.net/aapi/2009/08/">
<Brand id="2063">Brand Name</Brand>
<User>nadya@test.com</User>
<Responses>
<CreateMessage>
<ActionStatus>
<Status>success</Status>
<Message>Mailing 'Nadya test api' created.</Message>
</ActionStatus>
<MailingID>10482</MailingID>
</CreateMessage>
</Responses>
</ActionResponse>
Details
Node | Type | Description |
---|---|---|
<MailingID> | Int | The unique mailing ID in Informz. Use this to retrieve the mailing for editing, deleting, and scheduling the mailing for publishing. |
<Message> | String | Further description. |
<Status> | Enumerated String Type | What occurred in Informz for the action; valid values are success and failure. |
ScheduleMailing
Schedules a new outbound email in Informz for publishing. This step occurs after a successful CreateMessage has occurred.
Request
<ActionRequest xmlns="http://partner.informz.net/aapi/2009/08/"> <Brand id="9999">Test Brand</Brand> <User></User> <Password></Password> <Actions> <ScheduleMailing> <MailingID>408</MailingID> <PublishDateTime>2009-10-15T19:30:00</PublishDateTime> <AccountingCode>GeneralFund</AccountingCode> <IsTest>0</IsTest> <ReturnInvalidSubscribers>0</ReturnInvalidSubscribers> <TargetGroupAssignment> <DefaultTargetGroup> <TargetGroup> <Interest> <ReturnInvalidSubscribers>1</ReturnInvalidSubscribers> <TargetGroupName>New Interest</TargetGroupName> <SubscriberData> <FieldDefinitions> <FieldDefinition> <Name>First_Name</Name> <DataType>String</DataType> <DefaultValue>Customer</DefaultValue> </FieldDefinition> <FieldDefinition> <Name>Last_Name</Name> <DataType>String</DataType> <DefaultValue>McCustomer</DefaultValue> </FieldDefinition> </FieldDefinitions> <Subscribers> <Subscriber> <Email>bose@example.com</Email> <ID>7003</ID> <Fields> <Field element="First_Name">Satyendra</Field> <Field element="Last_Name">Bose</Field> </Fields> </Subscriber> </Subscribers> </SubscriberData> </Interest> </TargetGroup> </DefaultTargetGroup> </TargetGroupAssignment> </ScheduleMailing> </Actions> </ActionRequest>
Details
Node | Type | Req'd | Unique | Description |
---|---|---|---|---|
<AccountingCode> | String | False | False | Used for internal "bill back" in a shared services model. If the accounting code does not exist, it will be created. However, if the "Accounting Codes" extension is not enabled for the brand, these will not be available through the Informz UI. |
<DataType> | True | False | DataType of the supplied personalization field’s data. | |
<DefaultValue> | True | False | The value to be used if no value is supplied in the data. | |
<EmailAddress> | String | True | False | Email address. |
<Fields> | String | False | False | This section, if needed, contains the personalization data to satisfy the personalization (embedded) fields. If none is supplied the <DefaultValue> will be used. |
<Field element= "xxx">value</Field> |
? | False | False | The personalization field name followed by the value to be used. |
<Header> | False | False | Used when Personalization is desired within the content for this mailing. | |
<IsTest> | Int | True | True | Values: 0=False, 1=True Indicates if this is a test version (pre-publishing) to see how the mailing looks when it reaches an Inbox. |
<MailingID> | Int | True | True | The unique mailing ID in Informz. Use this to retrieve the mailing for editing and deleting, and for scheduling the mailing for publishing. |
<Name> | True | The name of a supplied personalization field. | ||
<PublishDateTime> | DateTime | True | False | When the mailing is published. If no time zone is listed, it will be interpreted as GMT. |
<Record> | True | The subscriber (i.e., emails or recipients) information. | ||
<RemoteID> | Int | True | True | Unique ID from the partner application for this email address. |
<ReturnInvalidSubscribers> | Int | True | True | Values: 0=False, 1=True Indicates if Informz is to pass back malformed email addresses in the Response document. These could subsequently be researched in the partner application. |
<Status> | String | False | False | |
<SubscriberData Story ID="###"> | Int | False | False | The unique story ID for the story supplied. If none supplied Informz will assume the HTMLContent provided is the story. |
<SubscriberID> | Int | False | False | The Informz unique ID associated with this email address. |
TargetGroupName | String | True | False | A descriptive name of the list of email recipients (and their personalization information if included) to be used for the publishing of this mailing. |
Notes
- After a mailing is published, a mailing instance is created. The mailing instance is where all reporting comes from.
- If <PublishDateTime> is blank, it is presumed that the mailing is to be published "Now."
- If <PublishDateTime> is within 7 days, in the past the mailing will be published "Now" + 1 minute.
- <PublishDateTime> cannot be more than 7 days ago.
- If <PublishDateTime> is passed missing either the date or the time, an exception will be raised.
- If the mailing can't be published due to billing rules (an overdue invoice), an exception will be raised.
Response
Scheduling response example without invalid subscribers. <ReturnInvalidSubscribers> = 1 in the request.
<?xml version="1.0" encoding="utf-16"?> <ActionResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://partner.informz.net/aapi/2009/08/"> <Brand id="9999">Test Brand</Brand> <User></User> <Responses> <ScheduleMailing> <ActionStatus> <Status>success</Status> <Message xsi:type="xsd:string"> Mailing scheduled to go out at 10/15/2009 7:30 PM</Message> </ActionStatus> <MailingID>408</MailingID> </ScheduleMailing> </Responses> </ActionResponse>>
Details
Node | Type | Description |
---|---|---|
<MailingID> | Int | The unique mailing ID in Informz. Use this to retrieve the mailing for editing, for deleting, and for scheduling the mailing for publishing. |
<Message> | String | Further description. |
<Status> | Enumerated String Type | What occurred in Informz for the action; valid values are success and failure. |
Set Mailing On Hold
Returns mailings count and request status with message.
Details
Node | Type | Req'd | Unique | Description |
---|---|---|---|---|
<ID> | Int | True | N/A | The mailing's unique ID |
Request
<?xml version="1.0" encoding="utf-8"?> <ActionRequest xmlns="http://partner.informz.net/aapi/2009/08/"> <Brand id="9999">Test Brand</Brand> <User></User> <Password></Password> <Actions> <SetMailingOnHold> <Mailings> <ID>1</ID> <ID>2</ID> <ID>3</ID> <ID>4</ID> </Mailings> </SetMailingOnHold> </Actions> </ActionRequest>
Response
<?xml version="1.0" encoding="utf-16"?> <ActionResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://partner.informz.net/aapi/2009/08/"> <Brand id="9999">Test Brand</Brand> <User></User> <Responses> <SetMailingOnHold> <Count>3</Count> <ActionStatus> <Status>success</Status> <Message>Set 4 mailings on hold</Message> </ActionStatus> </SetMailingOnHold> </Responses> </ActionResponse>
Notes
The maximum ID Node is 1000.