Create a customer tenant using trigger

Posted by ithrees on 21-Jul-2014 01:07

Hi all,

Is there a way to create a new customer tenant with the first admin user (first admin user should get the welcome email) programmatically using trigger in rollbase?

Thanks in advance.

All Replies

Posted by Mani Kumar on 21-Jul-2014 01:19


You can perform this action using the createCustomer() method.

This starts the process of creating a new customer tenant. A welcome email containing a temporary password is sent to the first administrative user when the process is complete.

If the password field is included in the list of fields, as in the example below, its value is used as the password for the first administrative user. In this case, the system does not send the welcome email to first administrative user and the password will not expire after the first log in.

Specific Example

DataField[] arr = new DataField[7];

arr[0] = getField("companyName", "API Test");

arr[1] = getField("email", "");

arr[2] = getField("lastName", "Admin");

arr[3] = getField("loginName", "");

arr[4] = getField("timeZone", "Pacific/Guam");

arr[5] = getField("mailSender", "");

arr[6] = getField("password", "my_password");

binding.createCustomer(sessionId, new DataFieldArr(arr), true);

Please refer the documentation url related to this method for more info:

Hope this helps. 



Posted by ithrees on 21-Jul-2014 01:31

Hi Mani,

Thank you for your reply.

The above you mentioned is a SOAP method to create a customer. In my case it is a rollbase application itself to create a new customer on conditions. Do you think the above method can be used for the same? and if it is, can you give more detail on how?

Thanks again.

Posted by pvorobie on 21-Jul-2014 10:57

You can also use "Create new record" trigger and map data from your record (say, Lead) into Customer.

Posted by on 21-Jul-2014 11:26

I am exactly trying with the same 'create new record' trigger and it is creating the customer record but not its' first subscriber - first admin. I couldnt figure out what I m really missing..

Posted by pvorobie on 21-Jul-2014 11:40

Please make sure that you're mapping info necessary to create First admin user:

- Login name

- Email address

Posted by ithrees on 22-Jul-2014 00:18

Those fields have been mapped correctly to relevant customer fields and they are getting the values on creation.

I notice something that the login name is being removed after a successful creation of a customer (when doing it manually) but in this case it is remaining with the field, suspecting the process is not complete.

Do you thing that this could be a permission issue? Is there any way to trace the error log for the cause?

This thread is closed