bus_facade_campaign_delivery


**Description :** Used in the scheduling and management of deliveries within the platform.
**Default Methods** Please ensure you're familiar with... - [**Introduction to Beans**](/documentation/soap/gettingstarted/beans) - [**Requests and Responses**](/documentation/soap/gettingstarted/requests) - [**Anatomy of a session**](/documentation/soap/gettingstarted/session)
**Unique Methods** To call these methods use the following example structure...
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_campaign_delivery
processName string  :   methodName  i.e. updateStatus
entityData  array   :   i.e. array('beanId' => ID of the bean (updated/loaded) in the bean store) 
processData array   :   i.e. array(null)
Name Parameters Description
updateStatus Entity Data: deliveryId A process to pause a currently running delivery. This sets the correct status on the delivery record and updates any part processed recipients

Example Process - Scheduling a Delivery

[**WSDL**](http://paint.pure360.com/paint.pure360.com/ctrlPaint.wsdl) *Our WSDL defines our web service and where to locate our web service. In understanding these examples please familiarise yourself with the handleRequest (paintRequest / paintResponse)*
**Step 1 :** Begin by searching for the list entity(ties) to schedule the delivery to and obtain the listIds... * Use the contextId to reference the current session in progress (generated during a login request - [bus_facade_context](/documentation/soap/gettingstarted/references/context) ) * To access the list entities use the campaign list entry point/gateway * Perform a search process with the writeable parameters that make up the list search process, ideally the name of the list. **Example Request / Response**
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_campaign_list
processName string  :   search
entityData  array   :   'listName' => "Master List"
processData array   :   null
paintResponse:
Result   array :
         'result'     => "success"
		 ‘resultData’ => array :
                         'bus_search_campaign_list_' => ""
            			 ...      => ...
						 'idData' =>  array :
              						  'listId' => 123456

**Step 2 :** Next search for the email entity to send to the lists collected in step 1. * Use the contextId to reference the current session in progress (generated during a login request - [bus_facade_context](/documentation/soap/gettingstarted/references/context) ) * To access the email entities use the campaign email entry point/gateway * Perform a search process with the writeable parameters that make up the email search process, ideally the name of the email. **Example Request / Response**
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_campaign_email
processName string  :   search
entityData  array   :   'messageName' => "August_Deals_2014"
processData array   :   null
paintResponse:
Result   array :
         'result'     => "success"
		 'resultData' => array : 
          				 'bus_search_campaign_email_' => ""
            			 ... 	  => ...
						 'idData' => array :
              						 'messageId' => 123456

**Step 3 :** Next create an empty delivery entity in the bean store and obtain a reference to this... * Use the contextId to reference the current session in progress (generated during a login request - [bus_facade_context](/documentation/soap/gettingstarted/references/context) * To access the delivery entities use the campaign delivery entry point / gateway. * Perform a create process without any entity fields to generate the new delivery entity bean. **Example Request / Response:**
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_campaign_delivery
processName string  :   create
entityData  array   :	 null
processData array   :   null
paintResponse:
Result   array :   
		'result'     => success
		'resultData' => array : 
						'bus_entity_campaign_delivery'  => array : 
                                                           ... => ...
														   ...  variables  ...
          												   ... => ...
														   'beanId' => ID for new empty bean in bean store

**Step 4 :** Next, choose the writable attributes, both required and optional and update the new entity bean in the bean store... * Use the contextId to reference the current session in progress (generated during a login request - [bus_facade_context](/documentation/soap/gettingstarted/references/context) * To access the delivery entities use the campaign delivery entry point/gateway * Perform an update process with the writeable parameters that make up the delivery creation process, the bean id of the new bean entity in the bean store returned from the create request, plus any optional parameters. **Example Request / Response**
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_campaign_delivery
processName string  :   update
entityData  array   :   
			'messageId' => Id of the message
		    'listIds'   => array : 
						   456789
						   487542
						   232323
			'beanId'    => ID of the empty bean returned during the create
            ... 		=> ...
			...  Required & optional variables  ...
            ... 		=> ...
processData array   :   null
paintResponse:
Result   array :
      	 'result'     => "success"
		 'resultData' => array : 
                         'bus_entity_campaign_delivery_key' => ""
            			 'messageId' => ""
            			 'beanName' => "bus_entity_campaign_delivery"

**Step 5 :** Finally complete a store request with the bean id of the new entity in the bean store to write this back to the platform and remove the bean from the bean store... * Use the contextId to reference the current session in progress (generated during a login request - [bus_facade_context](/documentation/soap/gettingstarted/references/context) * To access the delivery entities use the campaign delivery entry point/gateway * Perform a store process with the entity data parameter as the bean id of the new entity that has been created and updated. **Example Request / Response**
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_campaign_delivery
processName string  :   store
entityData  array   :   'beanId'  => ID of the entity bean in the bean store
processData array   :   null
paintResponse:
Result   array :
         'result' => "success"

bus_entity_campaign_delivery

Writeable Variables : STORE / UPDATE (Required)

Name Example Description
deliveryDtTm_base64
"REQvTU0vWVlZWSBISDpNTQ=="
The recommended way to send string data is base 64 encoded. The date/time that the delivery will be sent. Represented as a base 64 encoded string in the format shown in the example
deliveryDtTm
"DD/MM/YYYYY HH:MM"
If you can't base 64 encode the string, then you can use this variable as the date/time that the delivery will be sent. Represented as a string in the format shown in the example
filterIds
array(
  01234,
  45678
)
Array of ids of the filters that this delivery will be sent to. Optional if listIds given.
To get the filterIds perform a search on the [**filter facade class**](/documentation/soap/gettingstarted/references/filters)
listIds
array(
  01234,
  45678
)
Array of ids of the lists that this delivery will be sent to. Optional if filterIds given.
To get the listIds perform a search on the [**list facade class**](/documentation/soap/gettingstarted/references/list)
messageId
12454
Unique id of the message to send within the platform.
To get the listIds perform a search on the [**email facade class**](/documentation/soap/gettingstarted/references/email) or [**sms facade class**](/documentation/soap/gettingstarted/references/sms) or the overall [**message facade class**](/documentation/soap/gettingstarted/references/messages)

Writeable Variables : STORE / UPDATE (Optional)

Name Example Description
allowDefaultDynamicReplyInd
"Y"
Indicates whether default values will be used in place of dynamic reply fields
If omitted : Will default to "N"
allowMissingTrackingImageInd
"Y"
Indicates whether the user is happy to proceed with the delivery without a tracking image in the message
If omitted : Will default to "N"
allowMixedLanguagesInd
"Y"
Indicates whether a message can be sent to a list in a different language (character set)
If omitted : Will default to "N"
allowPausedSlsDeliveryInd
"Y"
Indicates whether the user is happy to pause the delivery when using subject line selector to analyse the results before commiting to the remaining
If omitted : Will default to "Y"
autoRescheduleResendInd
"Y"
Indicate whether to automatically update any resend delivery so that it is later than this delivery
deliveryFrequencyCondition
"CHANGE_PLAIN"
"CHANGE_HTML"
"CHANGE_BOTH"
"CHANGE_EITHER"
Specify whether this recurring delivery should only be sent if one or more parts of the content have changed.
Note that this is only available for deliveries that relate to emails using the "load webpage content" option.
deliveryFrequencyDays
"Depends on deliveryFrequencyType 
See description"
This field works in conjunction with deliveryFrequencyType. There are three types of delivery frequency, and the values permitted in this field will depend upon which is selected
If type is DAYS then value is integer increment of days between deliveries
If type is WEEKDAYS then value is integer representing 1->7 where 1 is monday
If type is MONTHDAYS then value is integer 1->28 representing days of the calender month (29->31 omitted due to February).
Note WEEKDAY and MONTHDAYs can have multiple values as "#, #" (i.e. if type is WEEKDAY : "1, 5" value would recur delivery monday and friday weekly)
deliveryFrequencyNoSendAction
"PAUSE"
"ROLL"
Specify what action to take if the condition is not met and no send is scheduled.
The default action is to roll forward to the next scheduled date, however the alternative is to PAUSE the delivery untill manual intevention
deliveryFrequencyResumeAction
"SEND"
"ROLL"
Specify how to resume a paused recurring delivery. This setting is only applicable to conditional recurring deliveries being unpaused where the delivery date has passed.
Send option resumes the delivery date to the current date so that it attempts to send immediately
deliveryFrequencyType
"DAYS"
"WEEKDAY"
"MONTHDAY"
This field determines how the deliveryFrequencyDays field will be interpretted.
forwardType
"LOGIN"
"IDENTITY"
Determines where to send replies to this campaign, if set to LOGIN replies are sent to the address associated with the system login that created the delivery, if it is set to IDENTITY or omitted replies from this campaign are sent to the forwarding address of the profile
itsEnabledInd
"N"
Indicator as to whether intelligent timed sending should be enabled for this delivery
limitReceiptActiveInd
"N"
Indicator as to whether deliveries to recipients should be limited by the receipt limit value
maxSendPerHour
20000
The maximum number of messages to be sent per hour.
resendSubject_base64
"RG9uJ3QgbWlzcyBvdXQh"
The recommended way to transfer string data is via Base 64 encoding. This is the alternative subject line for any resend deliveries base 64 encoded.
resendSubject
"Don't miss out!"
If you are unable to base 64 encode the string, then use this variable as the alternative subject line for any resend deliveries
slsEnabledInd
"N"
Indicator as to whether subject line selector should be enabled for this delivery

Read-Only Variables : CREATE / LOAD / RELOAD

Name Example Description
amendedBy
"test.sys"
Username of the user that amended the delivery last, only populated in an existing delivery
amendedDtTm
"24/02/2014"
"14:07:00"
The date time of the last amendment to this delivery, only populated in an existing delivery
createdBy
"test.sys"
Username of the user that created the delivery, only populated in an existing delivery
createdDtTm
"24/02/2014"
"14:07:00"
The date time delivery was created, only populated in an existing delivery
languageCode
"en_GB.ISO8859-15"
The language for this delivery. If the message and list disagree in terms of language code then the message's language code is used
allFilters
array(
  0 => array(
    "filterId"=>94402,
  	"filterName"=>"Pure360 Addresses",
  	"filterCount"=>5,
  	"amendedBy"=>"Test.sys",
  	"amendedDtTm"=>"DD/MM/YYYY HH:MM",
  	"listId"=>254707,
  	"pendingDeliveryCount"=>2,
  	"resendCount"=>1,
  	"automationCount"=>0
  )
}
An associative array (map) of all valid filters on this profile
allLists
array(
  0=>array(
  "listId"=>254707,
  "listName"=>"Master List",
  "externalSystemsCategory"=>"",
  "languageCode"=>"en_GB.ISO8859-15",
  "listCount"=>51515,
  "amendedBy"=>"Test.sys",
  "amendedDtTm"=>"DD/MM/YYYY HH:MM",
  "filterCount"=>1,
  "pendingListDeliveryCount"=>1,
  "pendingFilterDeliveryCount"=>1,
  "pendingAutomationCount"=>0
  )
}
An associative array (map) of all valid lists on this profile
allMessageData
array(
  0=>array(
  "messageId"=>332110,
  "messageName"=>"August_2014_Deals",
  "languageCode"=>"en_GB.ISO8859-15",
  "contentType"=>"EMAIL",
  "amendedBy"=>"test.sys"
  "amendedDtTm"=>"DD/MM/YYYY HH:MM",
  "pendingDeliveryCount"=>1
  )
)
An associative array (map) of all valid messages on this profile
allMessages
array(
  332110=>"August_2014_Deals"
)
An associative array of all valid messages on this profile indexed as key = messageId, value = messageName
listNames
"Master List, Master List New"
Comma separated string of list and filter names that were included in this delivery. This is preserved on the delivery and is not affected if the original lists/filters are modified or deleted after the delivery is completed.
approvedRejectedBy
"test.sys"
Username of the user that either approved or rejected the delivery. This is dependant upon the approver module and is not set directly
approvedRejectedDtTm
"24/02/2014"
"14:07:00"
Date/time that the delivery has been approved or rejected. This is dependant upon the approver module and is not set directly
approvedRejectedReason
"Not valid for target list"
If the delivery has been rejected then the reason is held here. This is dependant upon the approver module and is not set directly
approverEmails
An array of email addresses of all those logins that have an approval role for this delivery.
automationId
05465
The unique id of the automation representing the auotmation that scheduled this delivery
creditCalcAvailableExcess
50120
Represensts the amount of excess credits at the time of scheduling delivery.
creditCalcCurrent
4545152
Amount of standard credit at time of scheduling delivery
creditCalcEstimatedAvailiable
4545655
Estimated amount of credit available to use.
creditCalcEstimatedRequired
545697
Estimated amount of credit required for delivery
creditCalcEstimatedShortfall
567849
Estimated shortfall in credits
creditCalcRunningAndScheduled
6594515
Estimated amount of credit either running or scheduled to run.
creditCalcSafetyMargin
5000
Imposed safety margin.
defaultResentSubject
"Don't miss out on great deals!"
The default resend subject supplied by the user when creating or updating the message
deliveryCompleteDtTm
"24/02/2014"
"14:07:00"
Date/time that the delivery completed processing. This is the date and time that all messages were placed on the queue to be sent. Note that at this point, all credit adjustments have been made and only the actual sending of the emails (running asynchronous to the processing) is still to be completed.
deliveryId
659874
Unique identifier for this delivery.
deliveryReportId
454578
The id of the delivery report record that links to the tracking data.
deliveryMonitorInd
"N"
Indicator Y/N as to whether this delivery was monitored by the risk monitor. This would mean that the delivery was forced to be send at a slower rate for the safety of the system.
deliveryStartDtTm
"DD/MM/YYYY HH:MM"
Date/time that the delivery was started. This may be slightly behind the date/time that the delivery was scheduled to start and will depend upon the load on the system and any time lag (a few seconds) that currently exists between the scheduler and the start of the minute.
dynamicReplyInd
"N"
Indicator as to whtehr the delivery is using dynamic reply email
emailLoadFromUrlHtmlInd
"N"
Indicator as to whether the email content (if it is an email) is being loaded from a URL
emailLoadFromUrlPlainInd
"N"
Indicator as to whether the email content (if it is an email) is being loaded from a URL
forwardLoginId
The id of the login (login bean) that will receive the replied for this message. If blank then the default forward address from the profile (identity bean) will be used.
hasMultipleSubjectsInd
"N"
Indicator as to whether the delivery is using a message with multiple subject lines
identityName
"TestProfile"
Name of the profile that the delivery was created for. Note that this will retain the name of the profile at time of the the delivery even if the profile name is subsequently changed.
messageName
"August_2014_Deals"
Name of the message that was sent. This is preserved on the delivery and is not affected if the original message source is modified or deleted after the delivery is completed
resendType
""
The type of resend delivery this is or null if a standard delivery
sentContentCreatedInd
"N"
This will be set to true if the sent content has been generated. If it has then the you should view the archive content instead of the message content when displaying this delivery. The language code etc will be taken from the sent content and is no longer linked to the original message.
sentContentId
56487
Id of the content that was sent. This is a snapshot of the message sent and is held separately from the original message sorce.
sentContentType
"EMAIL"
"SMS"
Type (EMAIL or SMS) of the message that was sent.
slsEnabledInd
"N"
Indicator as to whether SLS should be enabled for this delivery
thresholdWarnSentInd
"N"
Indicator Y/N as to whether the risk monitor threshold has been breached whilst sending this delivery. If it was breached then the delivery has probably been paused by the system and would need to restart.
alreadyBounced
2
The number of recipients that have not been sent the message because they are marked as having previously bounced. Only populated once the delivery has been processed, and the status is completed
alreadyOptedOut
3
The number of recipients that have not been sent the message because they are marked as having previously opt-out out. Only populated once the delivery has been processed, and the status is completed
autoReplied
6
Total number of recipients that have returned what is considered an auto-reply i.e. out of the office. Only populated once the delivery has been processed, and the status is completed
blocked
4
Total number of recipients that have returned what is considered to be a block message. A block indicates that the receiving mail server has considered the message inappropriate material. Only populated once the delivery has been processed, and the status is completed
bounced
24
Total number of recipients that have hard bounced. Only populated once the delivery has been processed, and the status is completed
clicked
905
Total number of recipients that have clicked on one, or more, of the tracked links within the message. Assumes that tracking has been enabled for the message. Only populated once the delivery has been processed, and the status is completed
enroute
254
Total number of SMS currently enroute to the handset. This excludes all messages that were not attempted to be sent i.e. already bounced, already opted out, but includes those that we try to send in this delivery but which subsequently fail.
estimatedTotal
500
This is an estimate of the number of records in the delivery based only on adding the totals from all of the selected lists and filters. It will be inaccurate, and will only be set on existing deliveries (not new ones yet to be saved).
limitedReceipt
50
Total number of recipients that have not been sent this message because they have had their receipt limited by the limit receipt rule
opened
360
The total number of recipients that have requested the hidden image in the message (by opening the message with images displayed) or performed another action that is considered to imply an open event e.g. clicking a link.
optedOut
65
The total number of recipients that have requested to opt-out via one of the automated methods provided e.g. reply with the appropriate keyword in the subject line or follow the opt-out process in the opt-out page.
optedOutPassive
4
The total number of recipients that have not been sent this message because they have either not double opted in after using the sign-up page or who have requested a limited number of emails via the opt-out process and have already received the number that they requested.
outOfCredit
6
The total number of messages that were not sent because the account had insufficient credit.
received
986
Total number of SMS actually received by handsets. This excludes all messages that were not attempted to be sent i.e. already bounced, already opted out, and any that were attempted but failed.
repeatClicked
235
Total number of recipients that have clicked one or more tracked links more than once
repeatOpened
65
Total number of recipients that requested the hidden tracking image more than once
replied
110
Total number of recipients that have replied
sent
1687
Total number of messages actually sent to recipients. This excludes all messages that were not attempted to be sent i.e. already bounced, already opted out, but includes those that we try to send in this delivery but which subsequently bounce/fail.
sentToFriend
8
Total number of recipients that have forwarded this message using the sent to friend feature
softBounced
80
Total number of recipients that have returned what is considered to be a soft bounce. A soft bounce is a response that indicates that the recipient will not receive this message but may receive future messages e.g. mailbox full.
stopped
30
The number of reccipients that have not been sent the message because the delivery was stopped after it had begun.
total
90654
Total number of recipients (unique addresses) included in the lists/filters for this delivery at the time of processing the delivery.

bus_search_campaign_delivery

Writeable Variables : SEARCH

Name Example Description
deliveryStartFromDate
"01/01/2013"
The delivery start date search from
deliveryStartToDate
"01/01/2014"
The delivery start date search up to
listName
"Master List"
Searches for delivery entities based on the list name
messageName
"April 2014 Deals"
Searches for delivery entities based on the message name
deliveryStatuses
array(
  "COMPLETED",
  "STARTED"
)
Array of delivery statuses to include in the search
excludeAutomationDeliveries
"Y"
Set to 'Y' to exclude automation linked deliveries
excludeResendDeliveries
"Y"
Set to 'Y' to exclude automatic resend deliveries
includeRecurringDeliveries
"Y"
Set to 'Y' to include recurring deliveries
includeStandardDeliveries
"Y"
Set to 'Y' to include standard deliveries

Read-Only Variables : SEARCH

Name Example Description
idData
array(
  deliveryId=>123456,
  deliveryId=>234567
)
Array of deliveryIds returned from a search process