Skip to content

Create Rule

connect_create_rule R Documentation

Creates a rule for the specified Amazon Connect instance

Description

Creates a rule for the specified Amazon Connect instance.

Use the Rules Function language to code conditions for the rule.

Usage

connect_create_rule(InstanceId, Name, TriggerEventSource, Function,
  Actions, PublishStatus, ClientToken)

Arguments

InstanceId

[required] The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Name

[required] A unique name for the rule.

TriggerEventSource

[required] The event source to trigger the rule.

Function

[required] The conditions of the rule.

Actions

[required] A list of actions to be run when the rule is triggered.

PublishStatus

[required] The publish status of the rule.

ClientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Value

A list with the following syntax:

list(
  RuleArn = "string",
  RuleId = "string"
)

Request syntax

svc$create_rule(
  InstanceId = "string",
  Name = "string",
  TriggerEventSource = list(
    EventSourceName = "OnPostCallAnalysisAvailable"|"OnRealTimeCallAnalysisAvailable"|"OnRealTimeChatAnalysisAvailable"|"OnPostChatAnalysisAvailable"|"OnZendeskTicketCreate"|"OnZendeskTicketStatusUpdate"|"OnSalesforceCaseCreate"|"OnContactEvaluationSubmit"|"OnMetricDataUpdate"|"OnCaseCreate"|"OnCaseUpdate",
    IntegrationAssociationId = "string"
  ),
  Function = "string",
  Actions = list(
    list(
      ActionType = "CREATE_TASK"|"ASSIGN_CONTACT_CATEGORY"|"GENERATE_EVENTBRIDGE_EVENT"|"SEND_NOTIFICATION"|"CREATE_CASE"|"UPDATE_CASE"|"END_ASSOCIATED_TASKS"|"SUBMIT_AUTO_EVALUATION",
      TaskAction = list(
        Name = "string",
        Description = "string",
        ContactFlowId = "string",
        References = list(
          list(
            Value = "string",
            Type = "URL"|"ATTACHMENT"|"NUMBER"|"STRING"|"DATE"|"EMAIL"
          )
        )
      ),
      EventBridgeAction = list(
        Name = "string"
      ),
      AssignContactCategoryAction = list(),
      SendNotificationAction = list(
        DeliveryMethod = "EMAIL",
        Subject = "string",
        Content = "string",
        ContentType = "PLAIN_TEXT",
        Recipient = list(
          UserTags = list(
            "string"
          ),
          UserIds = list(
            "string"
          )
        )
      ),
      CreateCaseAction = list(
        Fields = list(
          list(
            Id = "string",
            Value = list(
              BooleanValue = TRUE|FALSE,
              DoubleValue = 123.0,
              EmptyValue = list(),
              StringValue = "string"
            )
          )
        ),
        TemplateId = "string"
      ),
      UpdateCaseAction = list(
        Fields = list(
          list(
            Id = "string",
            Value = list(
              BooleanValue = TRUE|FALSE,
              DoubleValue = 123.0,
              EmptyValue = list(),
              StringValue = "string"
            )
          )
        )
      ),
      EndAssociatedTasksAction = list(),
      SubmitAutoEvaluationAction = list(
        EvaluationFormId = "string"
      )
    )
  ),
  PublishStatus = "DRAFT"|"PUBLISHED",
  ClientToken = "string"
)