# 속성 기반 개인화

속성 기반 개인화는 사용자별로 다른 값을 메시지에 삽입하는 방법입니다.

이름, 등급, 최근 본 상품, 선호 카테고리 같은 값을 텍스트와 링크에 넣을 수 있습니다.

### 기본 문법

핵클은 Liquid 문법을 사용합니다.

```liquid
{{ user_properties["name"] | default: "고객" }}
```

값이 있으면 해당 값을 보여줍니다.

값이 없으면 `default` 뒤의 대체 문구를 보여줍니다.

필요하면 같은 방식으로 이벤트 속성도 사용할 수 있습니다.

```liquid
{{ event_properties["product_name"] | default: "추천 상품" }}
```

### 어디에 사용할 수 있나요?

* 메시지 제목과 본문
* 버튼 링크와 랜딩 URL
* 딥링크와 쿼리 파라미터

텍스트 입력창 우측의 **`{...}`** 버튼을 누르면 개인화 문구를 쉽게 추가할 수 있습니다.

![개인화 메시지 상세 설정](/files/lOlNkp68U7yNduq0Iepf)

### 예시

#### 메시지 내용

```liquid
{{ user_properties["name"] | default: "고객" }}님, 찜한 상품이 다시 입고되었어요.
```

#### 링크

```liquid
https://example.com/cart?user_id={{ user_properties["user_id"] }}
```

#### 딥링크

```liquid
myapp://products/{{ user_properties["last_viewed_product_id"] }}
```

### 대체 문구를 꼭 설정하세요

속성 값이 없는 사용자는 생각보다 자주 생깁니다.

이름, 상품명, 등급처럼 노출이 어색해질 수 있는 값에는 `default` 를 함께 넣는 것이 좋습니다.

```liquid
{{ user_properties["membership_level"] | default: "회원" }} 전용 혜택을 확인해보세요.
```

### 미리보기로 확인하세요

팝업에서 설정한 개인화 문구를 확인한 뒤 **사용자 메시지 미리보기**에서 값을 넣어보세요.

실제 노출 문구와 링크를 발송 전에 바로 확인할 수 있습니다.

![개인화 메시지 확인 및 미리보기](/files/23cjlTBIS7zJ3YImggeD)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hackle.io/crm-marketing/message-personalization/properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
