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 Event.Configure at the organization. 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
| Field | Type | Required | Description |
|---|
| typeId | uuid | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| name | string | Optional | |
| index | integer | Optional | |
| rootLogic | string | Optional | |
| groups | CreateEventTypeEffectRequestConditionGroup[] | Optional | |
| outputs | CreateEventTypeEffectRequestOutput[] | Optional | |
CreateEventTypeEffectRequestConditionGroup
| Field | Type | Description |
|---|
| logic | string| null | |
| threshold | integer| null | |
| conditions | CreateEventTypeEffectRequestCondition[]| null | |
CreateEventTypeEffectRequestOutput
| Field | Type | Description |
|---|
| type | string| null | |
| occupantRoleDefinitionId | uuid| null | |
| targetTemplateCollaboratorId | uuid| null | |
| subjectTemplate | string| null | |
| bodyTemplate | string| null | |
| recipients | CreateEventTypeEffectRequestOutputRecipient[]| null | |
| titleTemplate | string| null | |
| activityIsAllDay | boolean| null | |
| startAttributeId | uuid| null | |
| endAttributeId | uuid| null | |
| descriptionTemplate | string| null | |
| participants | CreateEventTypeEffectRequestOutputParticipant[]| null | |
| syncWithIntegrations | boolean| null | |
| integrationCalendarId | uuid| null | |
| templateEntityId | uuid| null | |
| roleDefinitionId | uuid| null | |
| targetAttributeId | uuid| null | |
| required | boolean| null | |
| isRequired | boolean| null | |
| isTaskTracked | boolean| null | |
| isTaskReviewRequired | boolean| null | |
| fillSource | string| null | |
| sourceQuestionId | uuid| null | |
| sourceRoleDefinitionId | uuid| null | |
| sourceAttributeId | uuid| null | |
| fillValue | string| null | |
CreateEventTypeEffectRequestCondition
| Field | Type | Description |
|---|
| sourceKind | string| null | |
| sourceId | uuid| null | |
| sourcePath | string| null | |
| operator | string| null | |
| value | string| null | |
CreateEventTypeEffectRequestOutputRecipient
| Field | Type | Description |
|---|
| crewId | uuid| null | |
| roleDefinitionId | uuid| null | |
| channel | string| null | |
CreateEventTypeEffectRequestOutputParticipant
| Field | Type | Description |
|---|
| crewId | uuid| null | |
| roleDefinitionId | uuid| null | |
Response
Type: uuid