inwise - email marketing and newsletter software company
 
inwise Top Background
Arrow on Service

Recipients Regular Import
Footer

Recipients Regular Import

Operation Name: operation Name
Description: description

All actions require a valid user name and password using authenticaion header.
Show a raw xml example including the authentication header.

Service url:https://api.inwise.com/InwiseWebServices.asmx

Adding a reference to inwise web services

User Name:
Password:  
Group ID :

Recipients

*for test purposes limited for 1 recipient and 1 field only :
E-mail :
Field1 Value :
* on the real service you can have up to 30 fields.

Fields Mapping

*for test purposes limited for email field and 1 more optional field only :
Email Field Column Name On Table :
* on the real service you should map the name of the email column to local field id 0 eg. emailColumnTitle=0
localFieldId :
Field Name On Table :
The service enables you to perform an import of recipients into the system.
The result of the service is the unique import id.

Parameters:

  • String recipients
    A string containing all the recipients data in a CSV format.
    The string must also contain the column headers.
    You can either create the string programatically or copy the source of a CSV file.
  • Array InwiseWebServices.FileImportMapping
    The mappings between the recipients data headers and the local custom fields on our system.
    Mapping of the email column will to the local id "0".
    You must provide at lease one mapping which is the mapping between the column containing the email address to the local field "0", all other column mappings are optional.
    Columns without mappings will be ignored.
  • int groupid
    The id of the group for importing the recipients to.
  • bool update
    A value indicating whether to update existing recipients data

Java Code:

//get a reference to the service InwiseWebServices ws = new InwiseWebServices();
InwiseWebServicesSoap inwiseWebServicesSoap = ws.getInwiseWebServicesSoap();

//fill the security header
HeaderHandler hh = new HeaderHandler("myusername", "myPassword");
hh.setHeader(inwiseWebServicesSoap);


//the recipient's data should be in the format of csv, you can either create them programatically or copy the source of a csv file

StringBuilder recipients = new StringBuilder();
recipients.append("myemail,first_name,last_name");//the column headers
recipients.append("\r\n");
for (int i = 0; i < 4; i++) {
//data is separated with ',', with new line after each row
recipients.append("mail" + i + "@mail.com,shlomo" + i + ",cohen" + i);
recipients.append("\r\n");
}

//set the mapping between the recipients data headers to the local fields on Inwise Application
inwise.ArrayOfFileImportMapping mapping = new ArrayOfFileImportMapping();
mapping.fileImportMapping = new ArrayList<FileImportMapping>();

FileImportMapping map0 = new FileImportMapping();
map0.setFileColumnName("myemail");//recipient data column name
map0.setLocalId(0);//mapping of the email column is always done to "0"
mapping.fileImportMapping.add(map0);

FileImportMapping map1 = new FileImportMapping();
map1.setFileColumnName("first_name");//recipient data column name
map1.setLocalId(1);//id of the field on Inwise Application
mapping.fileImportMapping.add(map1);

FileImportMapping map2 = new FileImportMapping();
map2.setFileColumnName("last_name");//recipient data column name
map2.setLocalId(3);//id of the field on Inwise Application
mapping.fileImportMapping.add(map2);

int targetGroupId = 19;//the id of the group to make the import to

Boolean update=false; //the result is the unique id of the import
int importId = inwiseWebServicesSoap.recipientsRegularImport(recipients.toString(), mapping, targetGroupId,update);

C# Code:

  //get a reference to the service

        InwiseWebServices.InwiseWebServices ws = new InwiseWebServices.InwiseWebServices();

 

        //fill the security header

        InwiseWebServices.SecHeader header = new InwiseWebServices.SecHeader();

        header.username = "username";

        header.pass = "myPassword";

        ws.SecHeaderValue = header;//set credentials

 

        //the recipient's data should be in the format of csv, you can either create them programatically or copy the source of a csv file

        StringBuilder recipients = new StringBuilder();

        recipients.AppendLine("myemail,first_name,last_name");//the column headers

        for (int i = 0; i < 4; i++)

        {

            //data is separated with ',', with new line after each row

            recipients.AppendLine("mail" + i + "@mail.com,shlomo" + i + ",cohen" + i);

        }

 

        //set the mapping between the recipients data headers to the local fields on Inwise Application

        InwiseWebServices.FileImportMapping[] mapping = new InwiseWebServices.FileImportMapping[3];

 

        mapping[0] = new InwiseWebServices.FileImportMapping();

        mapping[0].FileColumnName = "myemail";//recipient data column name

        mapping[0].LocalId = 0;//mapping of the email column is always done to "0"

 

        mapping[1] = new InwiseWebServices.FileImportMapping();

        mapping[1].FileColumnName = "first_name";//recipient data column name

        mapping[1].LocalId = 1;//id of the field on Inwise Application

 

        mapping[2] = new InwiseWebServices.FileImportMapping();

        mapping[2].FileColumnName = "last_name";//recipient data column name

        mapping[2].LocalId = 3;//id of the field on Inwise Application

 

        int targetGroupId = 19;//the id of the group to make the import to

 

        bool update = false;//update existing recipients details

 

        //the result is the unique id of the import

        int importId = ws.Recipients_RegularImport(recipients.ToString(), mapping, targetGroupId,update);

VB Code:

  'get a reference to the service

        Dim ws As InwiseWebServices.InwiseWebServices = New InwiseWebServices.InwiseWebServices()

 

        'fill the security header

        Dim header As InwiseWebServices.SecHeader = New InwiseWebServices.SecHeader()

        header.username = "username"

        header.pass = "myPassword"

        ws.SecHeaderValue = header 'set credentials

 

        'the recipient's data should be in the format of csv, you can either create them programatically or copy the source of a csv file

        Dim recipients As StringBuilder = New StringBuilder()

        recipients.AppendLine("myemail,first_name,last_name") 'the column headers

        Dim i As Integer

        For i = 0 To 4 - 1 Step i + 1

            'data is separated with ',', with new line after each row

            recipients.AppendLine("mail" & i & "@mail.com,shlomo" & i & ",cohen" & i)

        Next

 

        'set the mapping between the recipients data headers to the local fields on Inwise Application

        Dim mapping() As InwiseWebServices.FileImportMapping = New InwiseWebServices.FileImportMapping(3) {}

 

        mapping(0) = New InwiseWebServices.FileImportMapping()

        mapping(0).FileColumnName = "myemail" 'recipient data column name

        mapping(0).LocalId = 0 'mapping of the email column is always done to "0"

 

        mapping(1) = New InwiseWebServices.FileImportMapping()

        mapping(1).FileColumnName = "first_name" 'recipient data column name

        mapping(1).LocalId = 1 'id of the field on Inwise Application

 

        mapping(2) = New InwiseWebServices.FileImportMapping()

        mapping(2).FileColumnName = "last_name" 'recipient data column name

        mapping(2).LocalId = 3 'id of the field on Inwise Application

 

        Dim targetGroupId As Integer = 19 'the id of the group to make the import to

 

        Dim update As Boolean = False 'update existing recipients details

 

        'the result is the unique id of the import

        Dim importId As Integer = ws.Recipients_RegularImport(recipients.ToString(), mapping, targetGroupId,update)




Home  |  About us  |  Products  |  Service  |  Partners  |  Forum  |  Email Marketing Terms  |  Support  |  Contact us
Terms & Conditions  |  Privacy Policy  |  Anti Spam Policy  |  Site Map
© 2008 inwise LTD. All rights reserved.