# 브랜드 메세지 개인화 필드

## 1. 채널 타입별 개인화 가능 영역

| 채널 타입                    | 개인화 가능 영역       | 대응 필드명             |
| ------------------------ | --------------- | ------------------ |
| **텍스트 / 이미지 / 와이드 이미지형** | 내용              | content            |
|                          | 버튼별 URL         | buttons            |
|                          | 쿠폰              | coupon             |
| **와이드 아이템 리스트형**         | 헤더 텍스트, 아이템 리스트 | content            |
|                          | 버튼별 URL         | buttons            |
|                          | 쿠폰              | coupon             |
| **캐러셀 피드형**              | 캐러셀 피드          | carousel           |
| **비디오형**                 | 헤더, 내용          | content            |
|                          | 버튼              | buttons            |
|                          | 쿠폰              | coupon             |
| **커머스형**                 | 부가 정보(텍스트 등)    | content            |
|                          | 상품명, 상품가격       | commerce           |
|                          | 버튼              | buttons            |
|                          | 쿠폰              | coupon             |
| **캐러셀 커머스형**             | 인트로(상단 영역)      | content            |
|                          | 캐러셀 커머스         | carousel\_commerce |
|                          | 더보기 버튼          | content            |

***

## 2. 개인화 필드 Payload&#x20;

<table><thead><tr><th width="171.0634765625">필드명</th><th width="79.7880859375">타입</th><th>설명</th><th width="334.822265625">관련 JSON 스펙</th></tr></thead><tbody><tr><td>content</td><td>json</td><td>본문, 헤더, 부가정보 등 텍스트 및 콘텐츠 영역</td><td></td></tr><tr><td>coupon</td><td>json</td><td>쿠폰 정보 (할인 금액/율 등)</td><td>[2-1. Coupon] 참조</td></tr><tr><td>buttons</td><td>json</td><td>버튼별 URL, 텍스트 등</td><td></td></tr><tr><td>commerce</td><td>json</td><td>상품 정보 (상품명, 가격 등)</td><td>[2-2. Commerce] 참조</td></tr><tr><td>carousel</td><td>array </td><td>캐러셀 피드 콘텐츠</td><td>[2-3. Carousel] 참조</td></tr><tr><td>carousel_commerce</td><td>array </td><td>캐러셀 커머스형 콘텐츠</td><td>[2-4. CarouselCommerce] 참조</td></tr></tbody></table>

***

### 2-1. Coupon

| 필드명      | 설명    | 비고                                                                              | 타입   |
| -------- | ----- | ------------------------------------------------------------------------------- | ---- |
| `title`  | 쿠폰 제목 | 템플릿 생성 시 쿠폰 타입별 할인 정보를 입력하지 않은 경우, [쿠폰 타입 별 기본 카카오 변수](#undefined-1)로 치환 가능합니다. | json |
| `common` | 공통 영역 | 쿠폰 설명 및 URL (모바일/PC/Android/iOS 스킴 포함)                                          | json |

#### **쿠폰 타입별 기본 카카오 개인화 변수**

<table><thead><tr><th>쿠폰 타입</th><th>기본 카카오 개인화 변수</th><th data-hidden></th></tr></thead><tbody><tr><td>할인 금액</td><td>할인 금액</td><td></td></tr><tr><td>할인율</td><td>쿠폰 퍼센트</td><td></td></tr><tr><td>무료 증정</td><td>상품명</td><td></td></tr><tr><td>업그레이드</td><td>상품명</td><td></td></tr></tbody></table>

### 2-2. Commerce

| 필드명            | 설명           | 비고                   |
| -------------- | ------------ | -------------------- |
| `content`      | 부가 텍스트 또는 설명 |                      |
| `product_name` | 상품 이름        |                      |
| `price`        | 가격 정보        | \[5. Price(JSON)] 참조 |

***

### 2-3. Carousel

| 필드명       | 설명     | 비고                    |
| --------- | ------ | --------------------- |
| `content` | 부가정보   |                       |
| `coupon`  | 쿠폰 정보  | \[1. Coupon(JSON)] 참조 |
| `buttons` | 버튼 리스트 |                       |

***

### 2-4. CarouselCommerce

| 필드명            | 설명               | 비고                    | 타입   |
| -------------- | ---------------- | --------------------- | ---- |
| `content`      | 부가정보 (인트로/텍스트 등) |                       | json |
| `buttons`      | 버튼 리스트           |                       | json |
| `coupon`       | 쿠폰 정보            | \[1. Coupon(JSON)] 참조 | json |
| `product_name` | 상품명              |                       | json |
| `price`        | 가격 정보            | \[5. Price(JSON)] 참조  | json |

***

### 2-5. Price&#x20;

브랜드 메시지 템플릿 생성 시 가격 영역의 모든 값을 미입력한 경우 카카오 측의 기본(고정) 변수로 자동 개인화가 적용됩니다. 아래 조합으로 개인화 필드를 사용할 수 있습니다.

1. 정상가격
2. 정상가격 + 할인가격 + 할인율
3. 정상가격 + 할인가격 + 정액할인가격
4. 정상가격 + 할인가격 + 할인율 + 정액할인가격

<table><thead><tr><th>필드명</th><th>설명</th><th>타입</th><th data-hidden></th><th data-hidden>비고</th></tr></thead><tbody><tr><td><code>regular_price</code></td><td>정상가</td><td>json</td><td></td><td></td></tr><tr><td><code>discount_price</code></td><td>할인가</td><td>json</td><td></td><td></td></tr><tr><td><code>discount_rate</code></td><td>할인율</td><td>json</td><td></td><td></td></tr><tr><td><code>discount_fixed</code></td><td>정액할인가</td><td>json</td><td></td><td></td></tr></tbody></table>

***

## 3. 브랜드 메시지 개인화 필드 조회 API

## 카카오 브랜드 메시지 개인화 필드 조회

> 지정한 프로젝트 및 템플릿 ID에 대해 브랜드 메시지의 개인화 가능한 필드 구조를 더미값으로 반환합니다.

```json
{"openapi":"3.0.3","info":{"title":"Marketap 카카오 브랜드 메시지 개인화 필드 조회 API","version":"1.0.0"},"paths":{"https://crm.marketap.io/api/v1/sender/kakao-brand-message/fields":{"get":{"summary":"카카오 브랜드 메시지 개인화 필드 조회","description":"지정한 프로젝트 및 템플릿 ID에 대해 브랜드 메시지의 개인화 가능한 필드 구조를 더미값으로 반환합니다.","parameters":[{"name":"project_id","in":"query","required":true,"description":"프로젝트 ID","schema":{"type":"string"}},{"name":"template_id","in":"query","required":true,"description":"카카오 브랜드 메시지 템플릿 ID","schema":{"type":"string"}}],"responses":{"200":{"description":"조회 성공","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BrandMessagePersonalizationFieldsResponse"},"code":{"type":"integer"},"message":{"type":"string"}}}}}},"400":{"description":"잘못된 요청 (필수 파라미터 누락 등)"},"401":{"description":"인증 실패 (토큰 누락/만료)"}}}}},"components":{"schemas":{"BrandMessagePersonalizationFieldsResponse":{"type":"object","description":"브랜드 메시지 개인화 가능한 필드 구조","properties":{"content":{"type":"object","additionalProperties":{"type":"string"},"description":"메시지 본문(content) 내 개인화 가능한 필드"},"coupon":{"type":"object","properties":{"title":{"type":"object","additionalProperties":{"type":"string"}},"common":{"type":"object","additionalProperties":{"type":"string"}}}},"buttons":{"type":"object","additionalProperties":{"type":"string"},"description":"버튼 영역 내 개인화 가능한 필드"},"commerce":{"type":"object","properties":{"product_name":{"type":"object","additionalProperties":{"type":"string"}},"price":{"type":"object","properties":{"regular_price":{"type":"object","additionalProperties":{"type":"string"}},"discount_price":{"type":"object","additionalProperties":{"type":"string"}},"discount_rate":{"type":"object","additionalProperties":{"type":"string"}},"discount_fixed":{"type":"object","additionalProperties":{"type":"string"}}}}}},"carousel":{"type":"array","description":"캐러셀형 메시지의 개인화 필드 목록","items":{"type":"object"}}}}}}}
```

## 4. 브랜드 메시지 템플릿 조회 API

## 브랜드 메시지 템플릿 조회

> 지정한 프로젝트의 브랜드 메시지 템플릿 목록을 조회합니다.   이 API는 인증 토큰과 project\_id 검증이 필요합니다.<br>

```json
{"openapi":"3.0.3","info":{"title":"Marketap 브랜드 메시지 템플릿 조회 API","version":"1.0.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SenderResponse":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GetBrandTemplateRes"}}}},"GetBrandTemplateRes":{"type":"object","properties":{"template_id":{"type":"string"},"template_name":{"type":"string"},"message_type":{"type":"string","description":"브랜드 메시지 유형","enum":["TEXT","IMAGE","WIDE","WIDE_ITEM_LIST","CAROUSEL_FEED","CAROUSEL_COMMERCE","COMMERCE","PREMIUM_VIDEO"]},"is_tracking_required":{"type":"boolean"}}}}},"paths":{"/api/v1/sender/kakao-brand-message/templates":{"get":{"summary":"브랜드 메시지 템플릿 조회","description":"지정한 프로젝트의 브랜드 메시지 템플릿 목록을 조회합니다.   이 API는 인증 토큰과 project_id 검증이 필요합니다.\n","parameters":[{"name":"project_id","in":"query","required":true,"description":"프로젝트 ID","schema":{"type":"string"}}],"responses":{"200":{"description":"성공적으로 템플릿 목록을 조회한 경우","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderResponse"}}}},"400":{"description":"필수 파라미터 누락 또는 잘못된 요청"},"401":{"description":"인증 실패"},"500":{"description":"서버 내부 오류"}}}}}}
```
