Docs

Create Event Type Effect

POST /eventTypes/{typeId}/effects

POST/eventTypes/{typeId}/effects

Adds an effect to an event type and returns its id. An effect has a name, an index, a root logic (AND or OR), at least one condition group, and at least one output; when its conditions hold its outputs run. It starts enabled. The attributes, roles, crew and template entities it names must be available in this organization. Use the effect-types, effect-tokens, effect-condition-sources and effect-target operations on this controller to fill in the request. Requires organization admin. Conditions: each group combines its conditions with AND, OR, or AtLeast (with a threshold no higher than its condition count). A condition reads one source: Core (path name or location.name), Attribute, Role or IntakeAnswer (by definition id). Operators: eq, neq, contains, in, notIn, gt, lt, gte and lte compare a value; isNull, isNotNull and changed take none. isFilled, isNotFilled and is apply to roles only. isRequired, isNotRequired, isTaskTracked, isNotTaskTracked, requiredChanged and taskTrackedChanged read a role's or attribute's tracking flags and take no value. An effect runs again whenever a source its conditions read changes. Outputs: AddOccupantToHost pulls a role's occupants onto the event; Notification sends a composed message to chosen recipients; Activity builds an activity from two date attributes and keeps it in step with them; DisableTemplateEntity skips part of the base template, at creation only; SetRoleRequired, SetRoleTaskTracked and SetAttributeTracking set tracking flags; FillAttribute and FillRole fill a value or a role from an intake answer, a fixed value or, for attributes, a role's occupant. EventTypes_GetEffectTypes lists each output's arguments.

Path Parameters

FieldTypeRequiredDescription
typeIduuidRequired

Request Body

FieldTypeRequiredDescription
namestringOptional
indexintegerOptional
rootLogicstringOptional
groupsCreateEventTypeEffectRequestConditionGroup[]Optional
outputsCreateEventTypeEffectRequestOutput[]Optional

CreateEventTypeEffectRequestConditionGroup

FieldTypeDescription
logicstring| null
thresholdinteger| null
conditionsCreateEventTypeEffectRequestCondition[]| null

CreateEventTypeEffectRequestOutput

FieldTypeDescription
typestring| null
occupantRoleDefinitionIduuid| null
targetTemplateCollaboratorIduuid| null
subjectTemplatestring| null
bodyTemplatestring| null
recipientsCreateEventTypeEffectRequestOutputRecipient[]| null
titleTemplatestring| null
activityIsAllDayboolean| null
startAttributeIduuid| null
endAttributeIduuid| null
participantsAttributeIduuid| null
participantsRoleDefinitionIduuid| null
templateEntityIduuid| null
roleDefinitionIduuid| null
targetAttributeIduuid| null
requiredboolean| null
isRequiredboolean| null
isTaskTrackedboolean| null
isTaskReviewRequiredboolean| null
fillSourcestring| null
sourceQuestionIduuid| null
sourceRoleDefinitionIduuid| null
fillValuestring| null

CreateEventTypeEffectRequestCondition

FieldTypeDescription
sourceKindstring| null
sourceIduuid| null
sourcePathstring| null
operatorstring| null
valuestring| null

CreateEventTypeEffectRequestOutputRecipient

FieldTypeDescription
crewIduuid| null
roleDefinitionIduuid| null
channelstring| null

Response

Type: uuid