# Defining External Collaborator User Templates (QMS)

<!--QMS Audit Management Admin section-->
<!--Source File, original slug /76845/-->

[External Collaboration Management](/en/lr/76844/) uses the _External Collaborator User Templates_ component for automated creation of _Users_ from _Persons_. These templates attempt to create a _User_ record as per their configurations, filling in details from the values present on the _Person_ record.

Contact your Veeva Representative to create _External Collaborator User Templates_.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: As of 22R1, the only license type available for automatically created <em>User</em> accounts is the <em>External User</em> license type. You can use this feature if your organization has available <em>External User</em> licenses and if the <em>Person’s</em> email address has a different domain than your corporate email address.</p>
    </div>
  </div>
</div>



## About Username Pattern {#about-username}

The _Username Pattern_ field on an _External Collaborator User Template_ defines the resulting username through the use of dynamic tokens. These tokens can take the information from a given _Person_ record or the _Person's_ related _Organization_ record. This field only supports tokens for _Text_, _Number_, _Formula_, and _Lookup_ field values.

This field also supports a special token,` ${PersonEmailPrefix}`, which resolves to the portion of an email address before the "@" symbol. For example, if the email address listed on the _Person_ record is "Jane.Doe@veesupplier.com", the token resolves to "Jane.Doe".

### Example Username Pattern {#example-username}

An example _Username Pattern_ in a Vault with the recommended _Organization_ [object configuration][1] is the following:

`${PersonEmailPrefix}$-{Organization.email_suffix__c}`

For a _Person_ with the email address "Jane.Doe@veesupplier.com", an _Email Suffix_ value of "VeeSupp" and whose _User_ account is activated on the "veecorp.com" domain, this _Username Pattern_ resolves to "Jane.Doe-VeeSupp@veecorp.com". You must ensure any tokens referenced in the username pattern will not resolve to extremely long values, as generated usernames are still subject to the length and content requirements of a Vault user's username.

## Configuring the Organization Object {#configure-org-obj}

Optionally, you can ensure there is appropriate data to construct a username for the created user. Add a field to the _Organization_ object to contain an appropriate [username](/en/lr/953/#username) suffix, for example _Email Suffix_ (`email_suffix__c`). We strongly recommend you follow this step as this allows you to easily track and find _External User_ accounts related to their organizations. This helps to avoid conflicts in automatically generated usernames for external collaborators.

[1]: #configure-org-obj
