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

Groups External Create Group
Footer

Groups External Create Group

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:  
Database ID:
New Group Name:
Remote Table Name:
Fields Mapping
LocalFieldId : field 1
Remote Field Name :
Is Slicing : Yes   No
The service enables you to create a new external group based on an existing database connection.
The remote database must contain at least 2 columns with the names "Email" and "RemoteUserID". The column "RemoteUserID" must be of type int.

Parameters:

  • int dbid
    The id of the database connection from our system.
    When you create a new database connection on our system you get the id in result.
    You can also get a list of all your database connections.
  • string groupname
    The display name for the new group.
  • string remoteTableName
    The name of the table in the remote database in the recipients are.
  • array ExternalFieldsMappings
    The mapping between the remote table name and the custom fields of your recipients on our system.
    The mapping is optional, the mapping of the "Email" column and the "RemoteUserID" column are made automatically without mapping, so if you have no other fields you can leave this field empty or null.

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 id of the database connection from our system
int dbid = 1;

//the display name for the new group
String groupName="external group 44";

//the name of the table in the remote database in the recipients are
String remoteTableName="tableName";

//the mapping between the remote table name and the custom fields of your recipients on our system
inwise.ArrayOfExternalFieldsMappings mappings=new ArrayOfExternalFieldsMappings();

mappings.externalFieldsMappings=new ArrayList<ExternalFieldsMappings>();

ExternalFieldsMappings map1=new ExternalFieldsMappings();
map1.setLocalFieldId(1);//string field
map1.setRemoteFieldName("first_name");//the name on the remote table
mappings.externalFieldsMappings.add(map1);

ExternalFieldsMappings map2=new ExternalFieldsMappings();
map2.setLocalFieldId(28);//int field
map2.setRemoteFieldName("age");//the name on the remote table
mappings.externalFieldsMappings.add(map2);

//call the operation
int newGroupID = inwiseWebServicesSoap.groupsExternalCreateGroup(dbid, groupName, remoteTableName, mappings);

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 id of the database connection from our system

        int dbid = 1;

 

        //the display name for the new group

        string groupName="external group 1";

 

        //the name of the table in the remote database in the recipients are

        string remoteTableName="tableName";

 

        //the mapping between the remote table name and the custom fields of your recipients on our system

        InwiseWebServices.ExternalFieldsMappings[] mappings=new InwiseWebServices.ExternalFieldsMappings[2];

 

        mappings[0] = new InwiseWebServices.ExternalFieldsMappings();

        mappings[0].LocalFieldId = 1;//string field

        mappings[0].RemoteFieldName = "first_name";//the name on the remote table

 

        mappings[1] = new InwiseWebServices.ExternalFieldsMappings();

        mappings[1].LocalFieldId = 28;//int field

        mappings[1].RemoteFieldName = "age";//the name on the remote table

 

        //call the operation

        int newGroupID = ws.Groups_External_CreateGroup(dbid, groupName, remoteTableName, mappings);

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 id of the database connection from our system

        Dim dbid As Integer = 1

 

        'the display name for the new group

        Dim groupName As String = "external group 1"

 

        'the name of the table in the remote database in the recipients are

        Dim remoteTableName As String = "tableName"

 

        'the mapping between the remote table name and the custom fields of your recipients on our system

        Dim mappings() As InwiseWebServices.ExternalFieldsMappings = New InwiseWebServices.ExternalFieldsMappings(2) {}

 

        mappings(0) = New InwiseWebServices.ExternalFieldsMappings()

        mappings(0).LocalFieldId = 1 'string field

        mappings(0).RemoteFieldName = "first_name" 'the name on the remote table

 

        mappings(1) = New InwiseWebServices.ExternalFieldsMappings()

        mappings(1).LocalFieldId = 28 'int field

        mappings(1).RemoteFieldName = "age" 'the name on the remote table

 

        'call the operation

        Dim newGroupID As Integer = ws.Groups_External_CreateGroup(dbid, groupName, remoteTableName, mappings)




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.