Contact
Overview
A User or a Role that can interact with the Workflow App.
- From version: 2020.20
Properties
id
id: string
The contact's unique id.
const currentEntry = workflowApi.currentThread.entries[0];
if(workflowApi.session.currentUser.id === currentEntry.owner.id){
console.log("You can enable options for owner user only")
}
name
name: string
The contact's name in readable text.
workflowApi.session.currentUser.name.includes('admin')){
console.log("Current user name contains 'admin' in his name");
}
type
type: ContactType
The contact type. Contacts on a thread or entry can be either a user or a role type.
if(workflowApi.session.currentUser.type !== workflowApi.enums.ContactType.Role){
console.log("Current user is not a Role");
}