chore: Add documentation for automation rule, fix conversation/inbox_members (#4852)
This commit is contained in:
@@ -16,6 +16,8 @@ canned_response:
|
||||
$ref: ./resource/canned_response.yml
|
||||
custom_attribute:
|
||||
$ref: ./resource/custom_attribute.yml
|
||||
automation_rule:
|
||||
$ref: ./resource/automation_rule.yml
|
||||
contact:
|
||||
$ref: ./resource/contact.yml
|
||||
conversation:
|
||||
@@ -102,6 +104,10 @@ integrations_hook_create_payload:
|
||||
integrations_hook_update_payload:
|
||||
$ref: ./request/integrations/hook_update_payload.yml
|
||||
|
||||
# Automation Rule
|
||||
automation_rule_create_update_payload:
|
||||
$ref: ./request/automation_rule/create_update_payload.yml
|
||||
|
||||
|
||||
## public requests
|
||||
public_contact_create_update_payload:
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Rule name
|
||||
example: Add label on message create event
|
||||
description:
|
||||
type: string
|
||||
description: The description about the automation and actions
|
||||
example: Add label support and sales on message create event if incoming message content contains text help
|
||||
event_name:
|
||||
type: string
|
||||
enum:
|
||||
- conversation_created
|
||||
- conversation_updated
|
||||
- message_created
|
||||
example: message_created
|
||||
description: The event when you want to execute the automation actions
|
||||
active:
|
||||
type: boolean
|
||||
description: Enable/disable automation rule
|
||||
actions:
|
||||
type: array
|
||||
description: Array of actions which you want to perform when condition matches, e.g add label support if message contains content help.
|
||||
items:
|
||||
type: object
|
||||
example:
|
||||
action_name: add_label
|
||||
action_params:
|
||||
- support
|
||||
conditions:
|
||||
type: array
|
||||
description: Array of conditions on which conversation filter would work, e.g message content contains text help.
|
||||
items:
|
||||
type: object
|
||||
example:
|
||||
attribute_key: content
|
||||
filter_operator: contains
|
||||
query_operator: nil
|
||||
values:
|
||||
- help
|
||||
45
swagger/definitions/resource/automation_rule.yml
Normal file
45
swagger/definitions/resource/automation_rule.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
type: object
|
||||
properties:
|
||||
event_name:
|
||||
type: string
|
||||
description: Automation Rule event, on which we call the actions(conversation_created, conversation_updated, message_created)
|
||||
enum:
|
||||
- conversation_created
|
||||
- conversation_updated
|
||||
- message_created
|
||||
example: message_created
|
||||
name:
|
||||
type: string
|
||||
description: The name of the rule
|
||||
example: Add label on message create event
|
||||
description:
|
||||
type: string
|
||||
description: Description to give more context about the rule
|
||||
example: Add label support and sales on message create event if incoming message content contains text help
|
||||
active:
|
||||
type: boolean
|
||||
description: Enable/disable automation rule
|
||||
actions:
|
||||
type: array
|
||||
description: Array of actions which we perform when condition matches
|
||||
items:
|
||||
type: object
|
||||
example:
|
||||
action_name: add_label
|
||||
action_params:
|
||||
- support
|
||||
- sales
|
||||
conditions:
|
||||
type: array
|
||||
description: Array of conditions on which conversation/message filter would work
|
||||
items:
|
||||
type: object
|
||||
example:
|
||||
attribute_key: content
|
||||
filter_operator: contains
|
||||
values:
|
||||
- help
|
||||
query_operator: nil
|
||||
account_id:
|
||||
type: integer
|
||||
description: Account Id
|
||||
@@ -15,6 +15,10 @@ properties:
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: The object containing additional attributes related to the contact
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The object to save custom attributes for contact, accepts custom attributes key and value
|
||||
example: { attribute_key: attribute_value, signed_up_at: dd/mm/yyyy }
|
||||
contact_inboxes:
|
||||
type: array
|
||||
items:
|
||||
|
||||
@@ -30,3 +30,7 @@ properties:
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: The object containing additional attributes related to the conversation
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The object to save custom attributes for conversation, accepts custom attributes key and value
|
||||
example: { attribute_key: attribute_value, priority_conversation_number: 3 }
|
||||
|
||||
Reference in New Issue
Block a user