This document creates a new outbound email.
A mailing can have an unlimited number of stories, and when it is published, each story can be associated with a particular target group to facilitate dynamic content for subscribers. After a mailing has been created, it can be published to email recipients using the ScheduleMailing action.
The example below illustrates a mailing comprised of 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/"> <Brand id="9999">Test Brand</Brand> <User></User> <Password></Password> <Actions> <CreateMailing> <Name>New Fall Course Offerings</Name> <FriendlyFrom>Office of the Registrar</FriendlyFrom> <EmailFrom>registrar@test.edu</EmailFrom> <ReplyTo>registrar@test.edu</ReplyTo> <Subject>Exciting new fall courses</Subject> <TemplateID>1</TemplateID> <FolderName>FolderName1</FolderName> <Stories> <Story> <StoryID>1</StoryID> <Title>Title1</Title> <Rank>1</Rank> <HtmlContent>HtmlContent1</HtmlContent> <TextOnlyContent>TextOnlyContent1</TextOnlyContent> </Story> <Story> <StoryID>2</StoryID> <Title>Title2</Title> <Rank>2</Rank> <HtmlContent>HtmlContent2</HtmlContent> <TextOnlyContent>TextOnlyContent2</TextOnlyContent> </Story> <Story> <StoryID>3</StoryID> <Title>Title3</Title> <Rank>3</Rank> <HtmlContent>HtmlContent3</HtmlContent> <TextOnlyContent>TextOnlyContent3</TextOnlyContent> </Story> </Stories> </CreateMailing> </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 mailing will be created |
<FriendlyFrom> | String | False | False | The display name associated with the sender's email address |
<HTMLContent> | String | True | False | The mailing content to be sent to the recipients |
<Name> | String | True | False | Descriptive name for the mailing |
<Rank> | Int | False | True | The order of the stories within the collection. This is the order in which they will display within the mailing |
<ReplyTo> | String | False | False | The email address to send replies to |
StoryID | Int | True | True | The ID of the story |
<Subject> | String | True | False | Mailing's subject line seen by the recipient |
<TemplateID> | Int | False | False | The template to use for this mailing |
<TextOnlyContent> | String | False | False | The text version of the mailing content. If this is not provided, Informz will generate its own text version from the supplied HTML content |
<Title> | String | True | False | A single story's title |
Notes
- A CreateMailing document will yield a Mailing type of mailing in the Informz UI
- HTML formatting characters (such as '<') have to be replaced with XML encoded equivalents (such as '<')
- Personalization (aka "mail merge") field names can be embedded in <HTMLContent> and <TextContent>. These fields must have %% on both sides 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 a <FolderName> is not specified, the mailing will be created in the Main folder.
- If the specified <FolderName> has been deleted, an exception will be raised.
- If a <TemplateID> is not specified, the mailing will use the default template.
- If one of <EmailFrom>, <FriendlyFrom> and <ReplyTo> is specified, they all must be specified. If they are omitted, that envelope information will be taken from the template associated with the mailing.
- If the template used is an advanced template, for each <Story>, you must specify the name of a Location in a <Location> tag.
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> <CreateMailing> <ActionStatus> <Status>success</Status> <Message xsi:type="xsd:string">Mailing created.</Message> </ActionStatus> <MailingID>134322</MailingID> </CreateMailing> </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 |
<Message> | String | Further description |
<Status> | Enumerated String Type | Describes what occurred in Informz for the requested action (Values: success, failure) |