Configuration for one task a funnel creates on a lead, defining when it becomes due, who it is assigned to, and its title and description templates. Written as a "taskDef" element in the funnel's configuration. A funnel owns a list of these definitions; LeadManager.createTask reads a TaskDef to build the Task it saves, evaluating the title and description as KCode templates and resolving the assignee from assignToGroupName or assignToProfileRule. When agentDefName is set the assignee's agent is kicked off to work the task automatically, using agentPrompt as its instructions if given.

Group: Journeys


Properties

PropertyReturnsDescription
agentDefNameStringThe portable name of the AgentDef that should work this task. When set, the assignee's agent is started automatically to complete the created task instead of waiting for a person.
agentPromptStringA KCode instruction evaluated against the lead and passed to the agent working this task, used in place of the agent's default prompt.
assignToGroupNameStringThe portable name of the Group the created task is assigned to.
assignToProfileRuleStringA KCode expression evaluated against the lead to find the profile the created task is assigned to. Overrides the group-based assignment from assignToGroupName when it resolves to a profile.
categoryIdStringThe category this task definition belongs to, used by Funnel.findTaskDefsByCategory and by a TaskCompleteGoal's matchTaskCategory match.
descriptionTemplateStringA KCode template evaluated against the lead to produce the created task's description.
frequencyStringThe time unit used with periodMultiples to compute the created task's due date, one of the Funnel FREQ_HOURS, FREQ_DAYS, FREQ_WEEKS, FREQ_MONTHS or FREQ_YEARS constants.
periodMultiplesintThe number of frequency units added to the creation time to compute the created task's due date, for example 3 to mean 3 days when frequency is FREQ_DAYS. A value of zero or less means the task has no due date.
runHourIntegerAn additional number of hours added to the creation time before periodMultiples and frequency are applied, when computing the created task's due date.
tagIdsSet<String>The tags this task definition belongs to, used by Funnel.findTaskDefsByTag and by a TaskCompleteGoal's matchTaskTag match.
taskNameStringThe name given to tasks created from this definition, and the identifier used to look this definition up by Funnel.findTaskDef and by a TaskCompleteGoal's legacy taskName match.
titleTemplateStringA KCode template evaluated against the lead to produce the created task's title.

Methods

getTaskName() · getCategoryId() · getTagIds() · getFrequency() · getPeriodMultiples() · getRunHour() · getAssignToProfileRule() · getAssignToGroupName() · getTitleTemplate() · getDescriptionTemplate() · getAgentDefName() · getAgentPrompt()

getTaskName()

Returns: String

The name given to tasks created from this definition, and the identifier used to look this definition up by Funnel.findTaskDef and by a TaskCompleteGoal's legacy taskName match.

getCategoryId()

Returns: String

The category this task definition belongs to, used by Funnel.findTaskDefsByCategory and by a TaskCompleteGoal's matchTaskCategory match.

getTagIds()

Returns: Set<String>

The tags this task definition belongs to, used by Funnel.findTaskDefsByTag and by a TaskCompleteGoal's matchTaskTag match.

getFrequency()

Returns: String

The time unit used with periodMultiples to compute the created task's due date, one of the Funnel FREQ_HOURS, FREQ_DAYS, FREQ_WEEKS, FREQ_MONTHS or FREQ_YEARS constants.

getPeriodMultiples()

Returns: int

The number of frequency units added to the creation time to compute the created task's due date, for example 3 to mean 3 days when frequency is FREQ_DAYS. A value of zero or less means the task has no due date.

getRunHour()

Returns: Integer

An additional number of hours added to the creation time before periodMultiples and frequency are applied, when computing the created task's due date.

getAssignToProfileRule()

Returns: String

A KCode expression evaluated against the lead to find the profile the created task is assigned to. Overrides the group-based assignment from assignToGroupName when it resolves to a profile.

getAssignToGroupName()

Returns: String

The portable name of the Group the created task is assigned to.

getTitleTemplate()

Returns: String

A KCode template evaluated against the lead to produce the created task's title.

getDescriptionTemplate()

Returns: String

A KCode template evaluated against the lead to produce the created task's description.

getAgentDefName()

Returns: String

The portable name of the AgentDef that should work this task. When set, the assignee's agent is started automatically to complete the created task instead of waiting for a person.

getAgentPrompt()

Returns: String

A KCode instruction evaluated against the lead and passed to the agent working this task, used in place of the agent's default prompt.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.