Codeunit "Agent Task Builder"
This codeunit is used to create an agent task.
Properties
| Name | Value |
|---|---|
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
Initialize
Initialize the agent task builder with the mandatory parameters.
procedure Initialize(NewAgentUserSecurityId: Guid, NewTaskTitle: Text[150]): Codeunit "Agent Task Builder"
Parameters
| Name | Type | Description |
|---|---|---|
| NewAgentUserSecurityId | Guid | |
| NewTaskTitle | Text[150] |
Returns
| Type | Description |
|---|---|
| Codeunit System.Agents."Agent Task Builder" |
This instance of the Agent Task Builder. |
Create
procedure Create()
Create
procedure Create(SetTaskStatusToReady: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SetTaskStatusToReady | Boolean |
GetAgentTaskMessageCreated
procedure GetAgentTaskMessageCreated()
SetExternalId
Set the external ID of the task.
procedure SetExternalId(ExternalId: Text[2048]): Codeunit "Agent Task Builder"
Parameters
| Name | Type | Description |
|---|---|---|
| ExternalId | Text[2048] |
The external ID of the task. This field is used to connect to external systems, like Message ID for emails. |
Returns
| Type | Description |
|---|---|
| Codeunit System.Agents."Agent Task Builder" |
This instance of the Agent Task Builder. |
AddTaskMessage
Add a task message to the task. Only a single message can be added to the task.
procedure AddTaskMessage(From: Text[250], MessageText: Text): Codeunit "Agent Task Builder"
Parameters
| Name | Type | Description |
|---|---|---|
| From | Text[250] |
The sender of the message. |
| MessageText | Text |
The message text. |
Returns
| Type | Description |
|---|---|
| Codeunit System.Agents."Agent Task Builder" |
This instance of the Agent Task Builder. |
AddTaskMessage
Add a task message to the task. Only a single message can be added to the task.
procedure AddTaskMessage(var AgentTaskMessageBuilder: Codeunit "Agent Task Message Builder"): Codeunit "Agent Task Builder"
Parameters
| Name | Type | Description |
|---|---|---|
| AgentTaskMessageBuilder | Codeunit System.Agents."Agent Task Message Builder" |
The agent task message builder. |
Returns
| Type | Description |
|---|---|
| Codeunit System.Agents."Agent Task Builder" |
This instance of the Agent Task Builder. |
GetTaskMessageBuilder
Get the agent task message builder.
procedure GetTaskMessageBuilder(): Codeunit "Agent Task Message Builder"
Returns
| Type | Description |
|---|---|
| Codeunit System.Agents."Agent Task Message Builder" |
The agent task message builder. |
TaskExists
Check if a task exists for the given agent user and conversation
procedure TaskExists(AgentUserSecurityId: Guid, ConversationId: Text): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| AgentUserSecurityId | Guid | |
| ConversationId | Text |
The conversation ID to check. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if task exists, false if not. |