bus_facade_campaign_list


**Description :** Used in the management of contact lists 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)

Example Process - Creating a list

[**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 creating an empty list 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 list entities usie the campaign list entry point / gateway. * Perform a create process without any entity fields to generate the new list bean. **Example Request / Response:**
paintRequest:
contextId	string	: 	C-KFDsCMMHXpDUi0ltN0p3FvF
className 	string	: 	bus_facade_campaign_list
processName string	: 	create
entityData 	array	:   null
processData array	:   null
paintResponse:
Result   array	: 	
		 'result'     => "success"
		 'resultData' => array : 
                         ‘bus_entity_campaign_list  => array:
					                                               … => ….,
                                                                   … All entity variables ...
					                                               … => …..,
					                                               'beanId' => ID for new empty list 
                                                                               bean in bean store

**Step 2 :** 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) - context facade * To access the list entities use the campaign list entry point/gateway * Perform an update process with the writeable parameters that make up the list 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_list
processName string	: 	update
entityData 	array	:	'listName_base64' => "TWFzdGVyIExpc3Q="
								'beanId'   => ID of the empty bean returned during the create
							    … => ….,
                                … Required & optional writable variables...
							    … => …..,
processData *array*		: 	null
paintResponse:
Result   array :
		 'result'     => "success"
         'resultData' => array :
					     'bus_entity_campaign_list_key' => ""
						 'listId' => ""
						 'beanName' => "bus_entity_campaign_list"

Step 3 : 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) - context facade * To access the list entities use the campaign list 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_list
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_list

Writeable Variables : STORE / UPDATE (Required)

Name Example Description
emailCol
1
Index of the column that contains the email address within the source data. Index starts with the leftmost field at 0 (optional if mobileCol is set)
mobileCol
3
Index of the column that contains the mobile number within the source data. Index starts with leftmost field at 0 (optional if emailCol is set)
listName_base64
"TWFzdGVyIExpc3Q=" or RESERVED : "X19PUFRPVVRfXw=="
The recommended method to send string data, base 64 encoded. This variable represents the unique name of the list within the profile. __OPTOUT__ is a reserved name for suppression list uploads, records uploaded in the source data (paste file) will be opted out across the profile.
listName
"Master List" or RESERVED : "__OPTOUT__"
If you are unable to base 64 encode strings use this variable as the unique name of the list within the profile. __OPTOUT__ is a reserved name for suppression list uploads, records uploaded in the source data (paste file) will be opted out across the profile.
pasteFile_base64
"ZW1haWwsZmlyc3ROYW1lLGRvYlxudGVzdEB0ZXN0LmNvbSx0ZXN0LDI0LzExLzE5ODc="
The recommended method to send string data, base 64 encoded. This variable is the representation of the file data to send. The data should be a base 64 encoded string of comma separated data with each row on different lines (separated via \r\n or \n). Each row must contain an equal number of columns (commas) even if the data is omitted.
pasteFile
"email,firstName,dob\ntest@test.com,test,24/11/1987"
If you are unable to base 64 encode strings then use this variable for the string of file data to send. The data should be a string of comma separated data with each row on different lines (separated via \r\n or \n). Each row must contain an equal number of columns (commas) even if the data is omitted.
uploadFileNotifyEmail_base64
"dGVzdEB0ZXN0LmNvbQ==" or "aHR0cDovL3Rlc3QuY29tP2luY29taW5nPWNvbnRhY3RfbGlzdA=="
The recommended method to send string data. This variable represents the destination to send the list upload notification to. If uploadFileNotifyType is equal to EMAIL than this is an email address, if it either HTTP or REST then this is a URI.
uploadFileNotifyEmail
"test@test.com" or "http://test.com?incoming=contact_list"
If you are unable to base 664 encode strings use this variable to represent the destination to send the list upload notification to. If uploadFileNotifyType is equal to EMAIL than this is an email address, if it either HTTP or REST then this is a URI.
If IGNORE is specified as the uploadFileNotifyType then although ignored the string for this value is still required, therefore a string of 'FALSE' or 'NULL' or 'NONE' is recommended
uploadFileNotifyType
"EMAIL" or "HTTP" or "REST"
Specifies how to send the list upload completion notification (please see uploadFileNotifyEmail)
uploadTransactionType
"CREATE" or "REPLACE" or "APPEND"
Ensure the value is UPPER CASE. This specifies how to perform the list upload, either creating a new list, appending to an existing list or replacing an entire list. If replace or append remember to load the list entity into the bean store.

Writeable Variables : STORE / UPDATE (Optional)

Name Example Description
signupDateCol
4
Index of the column that contains the required signup date if passing in historical data. Signup dates must be formatted as "yyyy-mm-dd hh:mm:ss" or "yyyy-mm-dd" within the source data (pasteFile). If omitted : Automatically assigns current date time to upload
field#Col
(Where # is field index integer desired in the contact list)
2
Index of the column of specific custom data in the source file. Index starts with leftmost field at 0 If omitted: Custom data at that index is not referenced or pulled across from the source data
field#Name
(Where # is field index integer desired in the contact list)
"firstName"
String to use for the header of this custom data column
field#DataType
"date"
Constant value date indicates that the custom field indexed at # in the new contact list is a datetime field. This must be set in conjunction with "Field#DataFormat".
field#DataFormat
"dd/mm/yyyy"
String of format this column takes if it is a datetime and not a string/integer If omitted: Custom data is assumed as a string and not a datetime
languageCode
"en_GB.ISO8859-15"
Language code for this list, this is used primarily to warn the user if they are scheduling a message in a different character set to this list. If omitted: Profile default language code used for this list.
replacePendingFileInd
"N"
Indicates whether to replace a pending file on the list upload queue with a list of the same name. If omitted: Will return an error when trying to use the name of a list on the upload queue.

Read-Only Variables : CREATE / LOAD / RELOAD

Name Example Description
acceptedDtFormats
array(
  "dd/mm/yyyy" => "dd/mm/yyyy"
);
An array of acceptable date formats for use in custom fields
amendedBy
"test.sys"
Username of the user that uploaded or amended the list last, only populated in an existing list
amendedDtTm
"24/02/201414:07:00"
The date time of the last amendment to this list, only populated in an existing list
existingCustomFieldNames
array(
  "FirstName"=>"FirstName",
  "Age"=>"Age"
);
An array of the existing custom field names that have been created
field#NameReqInd
(where # is 1 -> 40)
"Y"
Indicates whether the list was uploaded with this field in use
listCount
154
The number of records in the list, populated when uploading a new list once data is received. If more than MAX_ROWS_FOR_LIST_COUNT (100000) then this will not be populated until after list has completed upload and will require the list to be "loaded"
listFilters
array( 
  "filterId"  => 00000, 
  "filterName" => "string",
  "filterCount" => 0,
  "amendedBy" => "test.sys",
  "amendedDtTm" => 
            "01/01/2014 00:00",
  "generatedDtTm" => 
            "31/12/2013 00:00",
  "listId" => 000000,
  "deliveryCount" => 0,
  "resendCount" =>0,
  "automationCount" => 0,
  "pendingDeliveryInd" => ""N"
);
Array of data regarding child filters. filterCount is the amount of records dropping into the child filter from the parent list. listId is the id of the parent list, deliveryCount is how many deliveries have been sent to this filter, pendingDeliveryInd is a character that indicates if this filter is associated with a pending delivery.
listId
123456
A unique identifier for the list derived by the system during list creation.
listLanguages
array(
  "en_GB.ISO8859-15" => 
  "{!response.db.language.en_gb_iso8859_15!}"
  );
Array of valid list languages for this profile.
listPendingDeliveryInd
"N"
Indicates whether the list is attached to a pending or processing delivery, regardless of if any child filters are or aren't.
ownerType
"identity"
The type of entity this list belongs to, only "identity" is allowed via PAINT
pendingAutomationInd
"Y"
Indicates whether this list is attached to an automation delivery.
pendingDeliveryInd
"Y"
Indicates whether this list OR filter is attached to a pending or processing delivery. So if a child filter is attached to a delivery this is set to Y, even if the list itself is NOT attached to any pending or processing deliveries.

bus_search_campaign_list

Writeable Variables : SEARCH

Name Example Description
amendedBy
"test.sys"
Searches for list entities by the username of who last amended the list
amendedFromDate
"01/01/2013"
Searches for list entities since date last amended
amendedToDate
"01/01/2014"
Searches for list entities up to a date last amended
listName
"Master List"
Searches for list entities based on a list name

Read-Only Variables : SEARCH

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