Encoding a user Alias
This document explains how the agentAlias
field is encoded, the purpose of each part, and provides examples to clarify its structure and usage.
Structure of agentAlias
An agentAlias
is encoded using the following structure:
realm:type:alias
Components
-
realm
- Represents the company or organization name.
- Examples:
com.one37id
. - Default: If not provided, the current agency realm is used.
-
type
- Specifies the type of the alias.
- Enum Values:
alias
,email
,default
,phone
, etc. - Default: If not provided, the type defaults to
alias
.
-
alias
- The actual alias of the agent.
- This is a unique identifier specific to the agent.
-
Delimiter
- The parts are separated by a colon (
:
).
- The parts are separated by a colon (
-
URL Encoding
- All parts of the
agentAlias
must be URL encoded to ensure proper transmission and parsing.
- All parts of the
Examples
Example 1: Fully Specified agentAlias
com.one37id:email:john%40gmail.com
realm
:com.one37id
(company name)type
:email
alias
:john@gmail.com
(URL encoded asjohn%40gmail.com
)
Example 2: Specified realm
and type
, Custom Alias
com.company:phone:123456789
realm
:com.company
(company name)type
:phone
alias
:123456789
(already URL safe, no encoding needed)
Example 3: Default realm
and type
:alias:mycustomalias
realm
: Defaults to the current agency realm (e.g.,com.one37id
).type
: Defaults toalias
.alias
:mycustomalias
(no additional encoding needed).
Example 4: URL Encoding Special Characters
com.one37id:email:first%2Elast%40example%2Ecom
realm
:com.one37id
type
:email
alias
:first.last@example.com
(URL encoded asfirst%2Elast%40example%2Ecom
)
Example 5: Using Only Alias
::simplealias
realm
: Defaults to the current agency realm (e.g.,com.one37id
).type
: Defaults toalias
.alias
:simplealias
.
Notes
- URL Encoding: Ensure all special characters in each part are properly encoded to avoid parsing errors.
- Defaults: If any part is omitted, the system automatically fills in the defaults.
- Delimiter: The colon (
:
) is mandatory between the sections.
By following this structure, the agentAlias
encoding ensures compatibility and reliability across systems and workflows.