// Handler
resource "highbond_handler" "main" {
name = "Feb 26 Handler 1"
description = "Description of My first Handler"
shared = false
condition_conjunction = "allOf"
force_updates = true // Create only with force update changes
conditions {
name = "BViswa"
condition_type = "specificFieldsAreRequired" // Values can be specificFieldsAreRequired,fieldValueComparison
configuration {
field_names = ["reviewSummary", "reviewer"]
// Required when condition_type is fieldValueComparison
left_operand_field_name = highbond_attribute_type.text.field_name
right_operand_value = ["test"]
operator = "equals"
}
scopes = ["self"]
on_failure_action = "stopAllHandlersForThisEvent"
// on_failure_display_message will be deprecated and replaced by show_failure_message. Only this boolean OR show_failure_message may be set in a single request
// Strictly Use either `on_failure_display_message` or `show_failure_message`. Do not use both the fields together
on_failure_display_message = true
show_failure_message = true
on_failure_message = "Testing"
}
actions {
name = "Action name1"
action_type = "transitionStatus" // Values can be notify,transitionstatus,runRobot and sendQuestionnaire
configuration {
status_id = "8bdecf0c-1145-4e2c-af90-da3a0595ec19" // Required when action_type is transitionStatus
}
scopes = ["self"]
}
actions {
name = "Action name2"
action_type = "notify"
configuration {
emails = ["ccc@aaa.com", "ddd@bbb.com"]
email_body = "This is test body"
email_subject = "This is the subject"
}
scopes = ["self"]
show_success_message = true
on_success_message = "Test success message"
}
actions {
name = "Action name3-Rub robot task"
action_type = "runRobot"
configuration {
task_id = highbond_robot_task.main.id
}
scopes = ["self"]
}
actions {
name = "Action name2-send the Questionnaire"
action_type = "sendQuestionnaire"
configuration {
allowed_questionnaire_ids = [highbond_questionnaire.main.id]
questionnaire_context_fields = ["field_names"]
email_attribute_field_name = highbond_attribute_type.email.field_name
distribution_type = "automated" // Values can be manual,automated
sent_questionnaire_id = highbond_questionnaire.main.id // Required when distribution_type is automated
}
scopes = ["self"]
}
}
name
(String) The name of the handleractions
(Block List) List of handler actions (see below for nested schema)condition_conjunction
(String) Type of conditions, can have possible Enum values: allOf, anyOfconditions
(Block List) An array of Conditions (see below for nested schema)description
(String) The description of the handlerforce_updates
(Boolean) Allows overriding top-level 'create_only' option.shared
(Boolean) Handlers can be marked as shared. Only shared handlers can be reused across multiple events in different workflowscreated_at
(String) The date the handler was createdid
(String) The ID of this resource.updated_at
(String) The date the handler was updatedactions
Optional:
action_type
(String) Can have Enum values: notify, transitionStatus, runRobot,sendQuestionnaireconfiguration
(Block List) Will have configuration for the action_type (see below for nested schema)name
(String) The name of the handler actionon_success_message
(String) When on_success_message is set, show_success_message must be set to true.scopes
(List of String) Array of strings, with default Items Value: selfshow_success_message
(Boolean) Whether or not an success message is shown.actions.configuration
Optional:
allowed_questionnaire_ids
(List of String) The list of questionnaires that are going to be displayed in the UI dropdown, for the user to choose from. Used and required for the manual distribution_typedistribution_type
(String) Distribution type. When set to manual, this implies that the event is being invoked manually (i.e. through APIs or the UI). When set to automated, this implies that the event is being invoked asynchronously through triggers (currently, is only supported using the fieldUpdated trigger type)email_attribute_field_name
(String) A field name that references a field containing an email address (which represents the questionnaire recipient). Text and user lookup fields can be used - at this time, only one email is supported (if there are multiple, only the first email in the field will be used). Used and required for the automated distribution_typeemail_body
(String) The email subject of the email notificationemail_subject
(String) The email body of the email notificationemails
(Set of String) The list of email addresses that the email notification will be sent toquestionnaire_context_fields
(List of String) A list of field names that the display name and value will be shown up in questionnaire responding pagesent_questionnaire_id
(String) The id of the questionnaire to be sent. Used and required for the automated distribution_typestatus_id
(String) The ID of the Workflow Status to transition an Item to by this Handler Actiontask_id
(String) The ID of the Workflow Robot task to runconditions
Optional:
condition_type
(String) Determines conditions under which an asset or record can advance to the next workflow status. Enum values:allRequiredFieldsAreProvided,specificFieldsAreRequired, fieldValueComparisonconfiguration
(Block List) Handler Conditions Configuration Options (see below for nested schema)name
(String) The name of the handler conditionon_failure_action
(String) Can have possible Enum values:stopAllHandlersForThisEvent, stopThisHandlerForTheCurrentItemon_failure_display_message
(Boolean, Deprecated)on_failure_message
(String) will have failure messagescopes
(List of String) Array of strings, with defult Items Value: selfshow_failure_message
(Boolean) Whether or not an error message is shown. If on_failure_message is defined a custom error message is shown.conditions.configuration
Optional:
field_names
(Set of String) list of attributes that need to be checkedleft_operand_field_name
(String) The field of whom's value will be operated on (will be used to compare against right_operand_value). To reference a workflow status' name, use metadata.workflow_statusoperator
(String) Numeric Operators (string) or Boolean Operators (string) or Text Operators (string) or Select Operators (string)right_operand_value
(List of String) A list of values that left_operand_field_name will be compared against. The values can be number-like, boolean-like, or text. At this time, we only support one value passed in this list. This value is ignored when operators is_blank or is_not_blank is used, in all other cases this value is required