View a markdown version of this page

API 또는 CLI를 사용하여 아웃바운드 캠페인 생성 - Amazon Connect Customer

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

API 또는 CLI를 사용하여 아웃바운드 캠페인 생성

AWS CLI 또는 Amazon Connect 아웃바운드 캠페인 API를 사용하여 프로그래밍 방식으로 아웃바운드 캠페인을 생성하고 관리할 수 있습니다. 이 주제에서는 CLI를 사용하여 Connect Customer 아웃바운드 캠페인을 생성하고, 캠페인 흐름을 정의하고, 수명 주기 명령을 참조하는 방법을 설명합니다.

사전 조건

API 또는 CLI를 사용하여 캠페인을 생성하기 전에 다음이 있는지 확인합니다.

캠페인 흐름 생성

캠페인 흐름은 각 수신자에 대해 실행되는 작업 시퀀스를 정의합니다. 흐름 유형이 로 설정된 CreateContactFlow API를 사용하여 흐름을 생성합니다CAMPAIGN. 각 작업 유형에 대한 자세한 내용은 섹션을 참조하세요여정 흐름 블록 정의.

단순 흐름(재시도 없음)

간단한 흐름은 전송 상태를 확인하지 않고 각 수신자에게 단일 통신을 보냅니다. 가장 간단한 흐름 구조는 다음과 같습니다.

{ "Version": "2019-10-30", "StartAction": "SendSMS", "Actions": [ { "Identifier": "SendSMS", "Type": "SendSMS", "Parameters": { "Message": { "MessageSourceType": "TEMPLATE", "TemplatedMessage": { "WisdomKnowledgeBaseArn": "arn:aws:wisdom:us-east-1:123456789012:knowledge-base/your-kb-id", "WisdomMessageTemplateArn": "arn:aws:wisdom:us-east-1:123456789012:message-template/your-kb-id/your-template-id" } }, "SourceEndpoint": { "Address": "arn:aws:connect:us-east-1:123456789012:phone-number/your-phone-number-id", "Type": "CONNECT_PHONENUMBER_ARN" } }, "Transitions": { "NextAction": "EndFlow", "Conditions": [], "Errors": [ { "NextAction": "EndFlow", "ErrorType": "NoMatchingError" } ] } }, { "Identifier": "EndFlow", "Type": "EndFlowExecution", "Parameters": {} } ] }

전송 상태 확인 및 재시도가 포함된 흐름

전송 상태를 확인하고 실패 시 다시 시도하는 흐름의 경우 다음 구조를 사용합니다. 흐름은 통신을 보내고, 전송 수신을 기다리고, 통신 상태를 검색한 다음 결과를 기반으로 분기합니다.

재시도 흐름의 주요 작업은 다음과 같습니다.

  1. SendSMS, SendOutboundEmail 또는 PutDialRequest - 아웃바운드 통신을 전송합니다.

  2. 대기 - 배달 영수증을 기다립니다.

  3. GetOutboundCommunicationStatus - 최신 통신의 전송 상태를 검색합니다.

  4. 비교 - 결과를 기반으로 전송 수신 및 브랜치를 평가합니다(예: 반송 메일에서 재시도, 성공 시 종료).

  5. EndFlowExecution - 흐름을 종료합니다. 모든 흐름 경로는이 작업으로 끝나야 합니다.

다음 예제는 SMS를 보내고, 전송 수신을 기다리고, 상태를 확인하고, 메시지가 반송된 경우 이메일로 재시도하는 MANAGED 캠페인의 흐름을 보여줍니다.

{ "Version": "2019-10-30", "StartAction": "SendSMS", "Actions": [ { "Identifier": "SendSMS", "Type": "SendSMS", "Parameters": { "Message": { "MessageSourceType": "TEMPLATE", "TemplatedMessage": { "WisdomKnowledgeBaseArn": "arn:aws:wisdom:us-east-1:123456789012:knowledge-base/your-kb-id", "WisdomMessageTemplateArn": "arn:aws:wisdom:us-east-1:123456789012:message-template/your-kb-id/your-sms-template-id" } }, "SourceEndpoint": { "Address": "arn:aws:connect:us-east-1:123456789012:phone-number/your-phone-number-id", "Type": "CONNECT_PHONENUMBER_ARN" } }, "Transitions": { "NextAction": "Wait", "Conditions": [], "Errors": [ { "NextAction": "EndFlow", "ErrorType": "NoMatchingError" } ] } }, { "Identifier": "Wait", "Type": "Wait", "Parameters": { "TimeLimitSeconds": "900" }, "Transitions": { "NextAction": "GetOutboundCommunicationStatus", "Conditions": [ { "NextAction": "GetOutboundCommunicationStatus", "Condition": { "Operator": "Equals", "Operands": ["WaitCompleted"] } } ], "Errors": [ { "NextAction": "EndFlow", "ErrorType": "NoMatchingError" } ] } }, { "Identifier": "GetOutboundCommunicationStatus", "Type": "GetOutboundCommunicationStatus", "Parameters": { "OutboundCommunicationIds": ["$.OutboundCommunication.Latest.Id"] }, "Transitions": { "NextAction": "Compare", "Conditions": [], "Errors": [ { "NextAction": "EndFlow", "ErrorType": "NoMatchingError" } ] } }, { "Identifier": "Compare", "Type": "Compare", "Parameters": { "ComparisonValue": "$.DeliveryReceipts['`$.OutboundCommunication.Latest.Id`'].Bounce" }, "Transitions": { "NextAction": "EndFlow", "Conditions": [ { "NextAction": "SendEmail", "Condition": { "Operator": "Exists", "Operands": [] } } ], "Errors": [ { "NextAction": "EndFlow", "ErrorType": "NoMatchingCondition" } ] } }, { "Identifier": "SendEmail", "Type": "SendOutboundEmail", "Parameters": { "EmailMessage": { "MessageSourceType": "TEMPLATE", "TemplatedMessage": { "WisdomKnowledgeBaseArn": "arn:aws:wisdom:us-east-1:123456789012:knowledge-base/your-kb-id", "WisdomMessageTemplateArn": "arn:aws:wisdom:us-east-1:123456789012:message-template/your-kb-id/your-email-template-id" } }, "FromEmailAddress": { "EmailAddress": "noreply@example.com" } }, "Transitions": { "NextAction": "EndFlow", "Conditions": [], "Errors": [ { "NextAction": "EndFlow", "ErrorType": "NoMatchingError" } ] } }, { "Identifier": "EndFlow", "Type": "EndFlowExecution", "Parameters": {} } ] }
중요
  • 흐름에서 여러 채널 유형(예: SMS 및 이메일)을 사용하는 경우 캠페인을 생성할 때 --channel-subtype-config 파라미터에 모든 채널을 포함합니다.

  • 전송 상태를 MANAGED 확인하는 유형의 캠페인에 사용되는 흐름의 경우 필요한 작업 순서는 대기GetOutboundCommunicationStatus비교입니다. Wait 작업은 지정된 기간 동안 흐름을 일시 중지하여 전송 수신이 도착할 시간을 허용합니다. GetOutboundCommunicationStatus 작업은 전송 상태를 검색합니다. Compare 작업은 결과를 기반으로 분기됩니다.

  • OutboundCommunicationIds 파라미터는를 참조GetOutboundCommunicationStatus해야 합니다$.OutboundCommunication.Latest.Id. Compare 작업의 전송 수신 참조는 동일한 키를 사용해야 합니다. 예를 들어 $.DeliveryReceipts['`$.OutboundCommunication.Latest.Id`'].Bounce입니다.

  • MANAGED 음성 채널을 사용하는 캠페인은 PutDialRequest 작업에가 필요합니다dialCriteriaRules.

    { "Identifier": "PutDialRequest", "Type": "PutDialRequest", "Parameters": { "dialCriteriaRules": [ { "type": "CheckSegmentMembershipForCustomerProfile", "segmentArn": "arn:aws:profile:us-east-1:123456789012:domains/your-domain/segments/your-segment" } ] }, ... }

캠페인 흐름 버전 생성

캠페인 흐름을 생성한 후 흐름 버전을 생성해야 합니다. 캠페인을 생성할 때 버전이 지정된 흐름 ARN이 필요합니다. CreateContactFlowVersion API를 사용하여 버전을 생성합니다.

버전이 지정된 흐름 ARN에는 버전 접미사가 포함됩니다. 예: arn:aws:connect:us-east-1:123456789012:instance/your-instance-id/contact-flow/your-flow-id:1

자세한 내용은 create-contact-flow-version CLI 참조를 참조하세요.

아웃바운드 캠페인 생성

create-campaign 명령을 사용하여 캠페인을 생성합니다. 다음 예시에서는 에이전트 없는 아웃바운드 모드로 SMS 캠페인을 생성합니다.

aws connectcampaignsv2 create-campaign \ --name "My SMS Campaign" \ --connect-instance-id "your-instance-id" \ --type MANAGED \ --connect-campaign-flow-arn "arn:aws:connect:us-east-1:123456789012:instance/your-instance-id/contact-flow/your-flow-id:1" \ --source '{"customerProfilesSegmentArn": "arn:aws:profile:us-east-1:123456789012:domains/your-domain/segments/your-segment"}' \ --channel-subtype-config '{ "sms": { "outboundMode": {"agentless": {}}, "defaultOutboundConfig": { "connectSourcePhoneNumberArn": "arn:aws:connect:us-east-1:123456789012:phone-number/your-phone-number-id", "wisdomTemplateArn": "arn:aws:wisdom:us-east-1:123456789012:message-template/your-kb-id/your-template-id" } } }' \ --schedule '{"startTime": "2026-07-01T09:00:00", "endTime": "2026-07-01T17:00:00", "refreshFrequency": "PT30M"}' \ --communication-time-config '{ "localTimeZoneConfig": {"defaultTimeZone": "America/New_York"}, "sms": { "openHours": { "dailyHours": { "MONDAY": [{"startTime": "T09:00", "endTime": "T17:00"}], "TUESDAY": [{"startTime": "T09:00", "endTime": "T17:00"}], "WEDNESDAY": [{"startTime": "T09:00", "endTime": "T17:00"}], "THURSDAY": [{"startTime": "T09:00", "endTime": "T17:00"}], "FRIDAY": [{"startTime": "T09:00", "endTime": "T17:00"}] } } } }' \ --region us-east-1

성공하면 명령은 캠페인 ID와 ARN을 반환합니다.

{ "id": "campaign-id", "arn": "arn:aws:connect-campaigns:us-east-1:123456789012:campaign/campaign-id" }
참고

--type 파라미터는 캠페인 유형을 지정합니다. 아웃바운드 캠페인MANAGED에 사용합니다. 다단계 다채널 여정JOURNEY에 사용 - 섹션을 참조하세요시각적 여정 빌더.

참고

수신자에게 연락할 수 있는 횟수를 제어--communication-limits-override하도록를 지정할 수도 있습니다. 파라미터의 전체 목록은 create-campaign CLI 참조를 참조하세요.

캠페인 수명 주기 작업(시작, 중지, 일시 중지, 재개, 삭제)을 관리하려면 AWS connectcampaignsv2에 대한 CLI 참조를 참조하세요.