Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This method creates and automatically starts an import process for the contacts listed in the xmlDoc parameter. You can use this method instead of calling a sequence of NewImportProcess and StartProcess methods. StartImportProcesses can also be used to update fields of an existing contact. Please note that, while updating, empty parameters are handled as "do not update this field", not as "overwrite with an empty value".

...

public string StartImportProcesses(string listsIDs, string listsGUIDs, string xmlDoc, string groupsIDs, int importType, int mobileInputType, bool asPending, bool ConfirmEmail, bool asOptOut, bool forceOptIn, bool replaceGroups)

 

Method parameters

Mandatory fields must be specified even when they are empty. Optional fields (can be skipped if you want to use the default value) are written in in blue. 

...

It is recommended that you specify the same ordered list for all the recipients to be imported/updated, also including the fields that are not to be set. 

Phone numbers are to be specified in the same format for all recipients in xmlDoc parameter using one of the following options:

Code Block
languagehtml/xml
<!--Option 1: number and prefix in a single field (use mobileInputType=1)-->
<subscriber email="user@myprovider.com" Prefix="" Number="+0018889624587" Name="">
 
<!--Option 2: number and prefix in separate fields (use mobileInputType=2)-->
<subscriber email="user@myprovider.com" Prefix="+001" Number="8889624587" Name="">


An example of XML structure for importing subscribers is shown here:

Code Block
languagehtml/xml
titleExample of xmlDoc
firstline1
linenumberstrue
collapsetrue
<subscribers>
     		<subscriber email="mike@example.com" Prefix="" Number="" Name="">
      			<campo1>Mike</campo1>
	      		<campo2>Brown</campo2>
      			<campo3>Example Consultancy</campo3>      		
      			<campo4>Los Angeles</campo4>
			<campo5> </campo5>
	      		<campo6>90125</campo6>
			<campo7>CA</campo7>     		
      			<campo8>US</campo8>
			<campo9>711 NW High St </campo9>
			<campo10></campo10>			
      			<campo11>555-123-1234</campo11>
     		</subscriber>
     		<subscriber email="kevin@example.it" Prefix="" Number="" Name="">
      			<campo1>Kevin</campo1>
	      		<campo2>Durant</campo2>
      			<campo3></campo3>
      			<campo4>Oklahoma City</campo4>
			<campo5></campo5>
	      		<campo6>73102</campo6>
			<campo7>OK</campo7>      		
      			<campo8>US</campo8>
			<campo9>100 West Reno Avenue</campo9>
			<campo10></campo10>
      			<campo11>1-555-456-4567</campo11>
     		</subscriber>
     		<subscriber email="mary@poppins.com" Prefix="" Number="" Name="">
	      		<campo1>Mary</campo1>
      			<campo2>Poppins</campo2>
			<campo3></campo3>     		
      			<campo4>London</campo4>
			<campo5></campo5>
	      		<campo6></campo6>
			<campo7></campo7>
      			<campo8>UK</campo8>
			<campo9></campo9>
			<campo10></campo10>
      			<campo11></campo11>
     		</subscriber> 		
  </subscribers>

 

Optional fields

Optional fields can be omitted. Numeric values 0 and 1 can be used instead of false and true.

Note

A 500 Error is returned if they are specified with an empty value (e.g. <asOptOut /> or  <asOptOut></asOptOut>).

 

...

Code Block
languagehtml/xml
titleSOAP request
linenumberstrue
collapsetrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.mailupnet.it/">
   <soapenv:Header>
      <ws:Authentication>
         <ws:User>user</ws:User>
         <ws:Password>password</ws:Password><ws:encType>UTF-8</ws:encType>
      </ws:Authentication>
   </soapenv:Header>
   <soapenv:Body>
      <ws:StartImportProcesses>
        <ws:listsIDs>1</ws:listsIDs>
	<ws:listsGUIDs>66af9900-xxxx-yyyy-zzzz-beadaf3a3a59</ws:listsGUIDs>
	
	<ws:xmlDoc>
		&lt;subscribers&gt;
            		&lt;subscriber email=&quot;mike@example.com&quot; Prefix=&quot;&quot; Number=&quot;&quot; Name=&quot;&quot;&gt;
	                	&lt;campo1&gt;Mike&lt;/campo1&gt;
	        	        &lt;campo2&gt;Brown&lt;/campo2&gt;
        	        	&lt;campo3&gt;Example Consultancy&lt;/campo3&gt;            
	        	        &lt;campo4&gt;Los Angeles&lt;/campo4&gt;
        				&lt;campo5&gt; &lt;/campo5&gt;
		                &lt;campo6&gt;90125&lt;/campo6&gt;
        				&lt;campo7&gt;CA&lt;/campo7&gt;             
	        	        &lt;campo8&gt;US&lt;/campo8&gt;
        				&lt;campo9&gt;711 NW High St &lt;/campo9&gt;
			        &lt;campo10&gt;&lt;/campo10&gt;         
        	        	&lt;campo11&gt;555-123-1234&lt;/campo11&gt;
			&lt;/subscriber&gt;
			&lt;subscriber email=&quot;kevin@example.it&quot; Prefix=&quot;&quot; Number=&quot;&quot; Name=&quot;&quot;&gt;
		                &lt;campo1&gt;Kevin&lt;/campo1&gt;
                		&lt;campo2&gt;Durant&lt;/campo2&gt;
		                &lt;campo3&gt;&lt;/campo3&gt;
        		        &lt;campo4&gt;Oklahoma City&lt;/campo4&gt;
			        &lt;campo5&gt;&lt;/campo5&gt;
		                &lt;campo6&gt;73102&lt;/campo6&gt;
			        &lt;campo7&gt;OK&lt;/campo7&gt;             
				&lt;campo8&gt;US&lt;/campo8&gt;
			        &lt;campo9&gt;100 West Reno Avenue&lt;/campo9&gt;
			        &lt;campo10&gt;&lt;/campo10&gt;
		                &lt;campo11&gt;1-555-456-4567&lt;/campo11&gt;
			&lt;/subscriber&gt;
			&lt;subscriber email=&quot;mary@poppins.com&quot; Prefix=&quot;&quot; Number=&quot;&quot; Name=&quot;&quot;&gt;
		                &lt;campo1&gt;Mary&lt;/campo1&gt;
				&lt;campo2&gt;Poppins&lt;/campo2&gt;
				&lt;campo3&gt;&lt;/campo3&gt;           
				&lt;campo4&gt;London&lt;/campo4&gt;
				&lt;campo5&gt;&lt;/campo5&gt;
				&lt;campo6&gt;&lt;/campo6&gt;
				&lt;campo7&gt;&lt;/campo7&gt;
				&lt;campo8&gt;UK&lt;/campo8&gt;
				&lt;campo9&gt;&lt;/campo9&gt;
				&lt;campo10&gt;&lt;/campo10&gt;
				&lt;campo11&gt;&lt;/campo11&gt;
			&lt;/subscriber&gt;         
		&lt;/subscribers&gt;
	</ws:xmlDoc>
         <!--Mandatory fields:--> 
        <ws:groupsIDs></ws:groupsIDs>
         <ws:importType>3</ws:importType>
         <ws:mobileInputType>1</ws:mobileInputType>
        <!--Optional:--> 
	<ws:ConfirmEmail>false</ws:ConfirmEmail>
	<ws:forceOptIn>true</ws:forceOptIn>
         <ws:asPending>false</ws:asPending>
         <ws:asOptOut>false</ws:asOptOut>
         <ws:replaceGroups>false</ws:replaceGroups>
      </ws:StartImportProcesses>
   </soapenv:Body>
</soapenv:Envelope>

...

Code Block
languagehtml/xml
titleSOAP response
linenumberstrue
collapsetrue
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<soap:Body>
	<StartImportProcessesResponse xmlns="http://ws.mailupnet.it/">
        <StartImportProcessesResult><![CDATA[
		<?xml version="1.0" encoding="windows-1252" ?>
		<mailupMessage>
			<mailupBody>
				<ReturnCode>0</ReturnCode>
				<processes>
					<process>
						<processID>69</processID>
						<listID>1</listID>
						<ReturnCode>0</ReturnCode>
					</process>
					<process>
						<processID>70</processID>
						<listID>2</listID>
						<ReturnCode>0</ReturnCode>
					</process>
				</processes>
			</mailupBody>
		</mailupMessage>]]>
	</StartImportProcessesResult>
      </StartImportProcessesResponse>
   </soap:Body>
</soap:Envelope>

...