웹훅으로 SMS 문자 보내기 (뿌리오)
업체에서 제공하는 API를 참고하여 웹훅 캠페인을 생성할 수 있습니다. 이번에는
뿌리오 메시지 발송 API 를 활용하여 웹훅을 만드는 경우를 알아보도록 하겠습니다.
URL 설정
먼저 뿌리오 메시지 발송 API 에 맞게 http method 와 URL 을 입력합니다.

Header 설정
Headers 탭에서 '추가하기' 버튼을 눌러 Key 와 Value 에 다음과 같이 세팅합니다.
뿌리오에서 발급받은 토큰 정보인 type 과 accesstoken 을 발송 대상 유저별로 동적으로 추가하기 위해 개인화를 활용하였습니다.
Key : Authorization
Value: {{user_properties.authorization_type}} {{user_properties.access_token}}

개인화 활용
{...} 를 눌러 개인화 메세지를 작성하는 것과 마찬가지로 이미 저장된 유저 및 이벤트 속성 을 활용해 위 예시와 같이 유저별 토큰 값 등을 동적으로 주입하는 등, 웹훅 메시지에 캠페인 설정 시에 활용할 수 있습니다.
Body 설정
Body 탭을 눌러 다음과 같이 Request body 를 Json 형식으로 작성합니다.

SMS Delivery Body Sample
개인화 활용
{...} 를 눌러 개인화 메세지를 작성하는 것과 마찬가지로 이미 저장된 유저 및 이벤트 속성 을 활용해 아래 예시와 같이 유저별 전화번호 등을 동적으로 주입하는 등, 웹훅 메시지에 캠페인 설정 시에 활용할 수 있습니다.
curl https://api.bizppurio.com/v3/message \
-X POST \
-H "Content-Type": "application/json" \
-H "Authorization": "{{user_properties.authorization_type}} {{user_properties.access_token}}" \
-d '{
"account": "bizppurio_account123",
"type": "SMS",
"from": "+821012345678",
"to": "{{user_properties["phone-number"] | default: ""}}",
"country": "KR",
"content": {
"sms": {
"message": "메시지"
}
},
"refkey": "REFKEY123456789",
"userinfo": "DEPT_CODE001",
"resend": {
"account": "test",
"messagekey": "190922175225820#ft002951servj8FU67"
},
"recontent": {
"sms": {
"message": "대체 메시지"
}
},
"resellercode": "RESELLER_CODE001",
"sendtime": "2024-04-27T15:30:00Z"
}'
대상 설정
웹훅 발송 대상이 될 코호트를 설정합니다.

요약
이제 웹훅을 캠페인 설정을 저장합니다. 아래와 같은 요약을 확인할 수 있습니다.

발송 설정
이제 발송 설정을 통해 실제로 웹훅 캠페인을 활성화 합니다.
발송 설정 화면에서 예상 발송 대상에 대한 정보를 확인할 수 있습니다.
발송 유형 및 고객 피로도 관리를 세팅한 후 '시작하기'를 눌러 캠페인을 활성화 합니다.

완료
뿌리오 웹훅 캠페인 활성화가 완료되었습니다.
통계 부분을 확인하여 캠페인의 성과를 추적해보세요

Updated 28 days ago