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.
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.
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.
DataField arr = new DataField;
arr = getField("companyName", "API Test");
arr = getField("email", "firstname.lastname@example.org");
arr = getField("lastName", "Admin");
arr = getField("loginName", "email@example.com");
arr = getField("timeZone", "Pacific/Guam");
arr = getField("mailSender", "firstname.lastname@example.org");
arr = 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.
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?
You can also use "Create new record" trigger and map data from your record (say, Lead) into Customer.
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..
Please make sure that you're mapping info necessary to create First admin user:
- Login name
- Email address
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?