Multi-tenancy

Posted by Ramon Schouten on 04-Oct-2016 03:08

Dear all,

I think my colleague Bernard Moeskops has already filed the issue/question.
Though, he has not received an answer which has solved our issue or given a workaround.

So hereby i will file the issue again.

We have the need to create a tenant within a tenant.

For example:

We need to create a customer in our main tenant.
Within this newly created tenant we have the need to create another (multiple even) tenants.

This is needed for a better overview and to make sure we can use our mail template for creating a new subscriber/user.

Right now we have a mail template, but this is used whenever a user is created. We only want this to happen
whenever a new user is created in specific occasions.

If the multi/tenancy is not possible right now or if there isn´t a workaround for.
If then; is there a possibility to have multiple mail templates for creatin users? (which can be specified for specifiic occasions).

I look forward to hearing from you guys!

Greetings,

Ramon Schouten

Posted by Santosh Patel on 11-Oct-2016 05:22

Then this is what you need to do.

Go to Administrative setup > Preferences

and turn off welcome email option. This will stop sending the default email template (which is a system template).

Add a checkbox field on the USER object, say isClient with default value as unchecked. When creating a user through API set this field to true.

Create 2 'Send Email' triggers with 'After Create' timing on the USER object, selecting 1 email template each.

On the "client email" trigger, in the formula box at the bottom of the page use the following formula,

return {!isClient};

And a not of that condition "return !{!isClient};" in the regular user template trigger. Both triggers will fire when a user is created but based on the isClient field's value, the formula will decide which email to fire.

You can extend this logic to have multiple different set of users and use a picklist or similar multi-value field to decide on which mail to fire.

All Replies

Posted by Santosh Patel on 08-Oct-2016 03:46

The mail template associated with the user creation is a default one that is shipped and is fully customizable. This means that you can discard this altogether and create your own mail template/triggers on the USER object in your base application and implement logic of when to trigger which template.

I can be more specific if you can shed some light on what are these specific occasions that you mention.

Posted by Ramon Schouten on 11-Oct-2016 03:05

Hi santosh,

The idea is that clients of ours can access our Rollbase environment.

When we create an account for them they should receive a customized e-mail.

I have created this customized e-mail and set this as the default mail.

However Now every new user receives that e-mail when they are created.

The idea is that only our newly created clients (created by API through another service) receive the customized e-mail,

When I create a new user manually I still want them to receive the default 'Welcome to Rollbase' e-mail.

Is this also possible?

Because I want two different mail templates for the same action (create user). Only vary between those templates depending on the form of action. manual or automatically requested by API.

Thanks!

Posted by Santosh Patel on 11-Oct-2016 05:22

Then this is what you need to do.

Go to Administrative setup > Preferences

and turn off welcome email option. This will stop sending the default email template (which is a system template).

Add a checkbox field on the USER object, say isClient with default value as unchecked. When creating a user through API set this field to true.

Create 2 'Send Email' triggers with 'After Create' timing on the USER object, selecting 1 email template each.

On the "client email" trigger, in the formula box at the bottom of the page use the following formula,

return {!isClient};

And a not of that condition "return !{!isClient};" in the regular user template trigger. Both triggers will fire when a user is created but based on the isClient field's value, the formula will decide which email to fire.

You can extend this logic to have multiple different set of users and use a picklist or similar multi-value field to decide on which mail to fire.

This thread is closed