Submissions
Last updated
Last updated
Submissions are collections of records that are submitted against a campaign. The records are made up of the required recipient information and the relevant campaign specific fields that have been configured in the The POST endpoints allow users to submit either an entire self contained collection of records intended to be sent together on a specific date or they can submit individual records after an appropriate event has occurred.
Its very important to note that low volumes of records submitted to the ZAPI will be compiled into larger submissions at the end of each day. This is to reduce the total volume of submissions created against a campaign and make monitoring a much easier task for regularly scheduled campaigns. This means you won't be able to query for any updates on records submitted until the day after submission when they've been batched.
Users can also list any submissions that exist against a campaign or list submissions actively working through the ZAP flow before being sent.
Any records or submissions sent to the ZAP API will be automatically included on the soonest available scheduled send if one is not specified. Unless you wish to use a specific send in the future it's most likely you don't need to specify the scheduled send on the request.
When creating a submission users have the option to set 'OnlyValidRecords' to true or false. When true the records in the submission will only be accepted if every record is valid. If 'OnlyValidRecords' is set to false, then any records that pass validation will be accepted and any that fail will not and will be returned in the usual response format detailing the validation failures.
Expected values are configured against fields on the campaign. If any expected values exist, then the API will only accept the values within that list. For example, I might configure a DayOfTheWeek field on my campaign. If I do this I may configure the expected values "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" and "Sunday". Any records that fail because of an expected value will have the list of valid values returned in the error provided on submission.
Validations are regex expressions and paired messages. When a record is received against the campaign ZAP will validate that all validation expressions are passed. If any fail, a list of errors will be compiled with the relevant message configured for the validation expression. This piece of functionality provides more advanced validation as the regex expressions can get quite complex.
The custom data object is used for custom fields that are created for a campaign. Each customField property should match the 'label' given to the matching custom field. Querying the GET campaign/{CampaignId} endpoint will return a list of all custom fields for the campaign.
We now support people submitting the same customer id more than once over separate requests to the "/records" endpoint. As a submission will only allow a single customer id, we will retain the data for the first record with that customer id and return a new "duplicateIgnoredRecords" object on any following requests that lists any records from the current submission that have not been accepted due to duplicates.
CustomerId
Yes
Must be unique
100
No
be in standard email address format.
255
Company Name
No*
Must be alphanumeric, space, -, (, ), full-stop and ' only.
120 total**
Salutation
No*
Must be alphanumeric, full-stop and space only.
120 total**
Firstname
No*
Must be alphanumeric, space, -, (, ), full-stop and ' only.
120 total**
Surname
No*
Must be alphanumeric, space, -, (, ), full-stop and ' only.
120 total**
Address1
No***
Must contain alphanumeric, space, ', ., &, -, /, \, ), ( and , characters only.
150 total****
Address2
No***
Must contain alphanumeric, space, ', ., &, -, /, \, ), ( and , characters only.
150 total****
Address3
No***
Must contain alphanumeric, space, ', ., &, -, /, \, ), ( and , characters only.
150 total****
City
No***
Must contain alphanumeric, space, ', ., &, -, /, \ and , characters only.
150 total****
Postcode
No***
Must be alphanumeric, - and spaces only.
150 total****
Country
Yes
Must contain letters, space, -, (, ), full-stop, & and ' only.
255
Currency
No
Must contain letters only.
3
Language
No
Must contain letters only.
10
* The delivery name cannot be null, some combination of Salutation, First Name, Surname and Company Name is required.
** Since the name can be comprised of multiple fields the 120 character maximum applies cumulatively across the following fields Salutation, First Name, Surname and Company name
*** We will allow you to submit any combination address fields however we do require an address to deliver to. Your submission can be made up or one of more of the following fields: Address1, Address2, Address3, City, Postcode. Since some of our clients don't usually hold customer addresses, their data isn't always standardised. This makes it easier to submit the data you do have and we'll do the clean up.
**** Since the name can be comprised of multiple fields the 150 character maximum applies cumulatively across the following fields: Address1, Address2, Address3, City, Postcode
For more information visit the documentation
{"campaignId":"f8db0756-947d-4ef8-935f-37d6c282fe19","scheduledSendDateId":"5cc5a5e6-714c-4dcb-8202-ca2ede6cc0b0","onlyValidRecords":true,"submissions":[{"customerid":"Value","email":"Value","salutation":"Value","firstname":"Value","surname":"Value","companyname":"Value","address1":"Value","address2":"Value","address3":"Value","city":"Value","postcode":"Value","country":"Value","currency":"Value","language":"Value","customData":{"customField1":"Value","customField2":"Value"}}]}
For more information visit the documentation
{"campaignId":"904c1dac-4db2-46a2-b97a-f0dae573d707","scheduledSendDateId":"4ad53391-9f29-49bd-93c6-abe5be40d37d","onlyValidRecords":true,"submissions":[{"customerid":"Value","email":"Value","salutation":"Value","firstname":"Value","surname":"Value","companyname":"Value","address1":"Value","address2":"Value","address3":"Value","city":"Value","postcode":"Value","country":"Value","currency":"Value","language":"Value","customData":{"customField1":"Value","customField2":"Value"}}]}