# 모범 사례

아래의 모범 사례는 API 연동을 위한 기본 세팅을 완료하였다고 가정합니다. API 연동을 위한 기본 세팅을 아직 하지 못했다면, [시작하기 전에](/api-guide/readme.md#undefined) 를 참고해 주시면 됩니다.

## 오프라인 데이터를 DFINERY 서버로 전송

DFINERY Import API를 사용하여 다양한 오프라인 데이터를 DFINERY 서버로 전송할 수 있습니다.

### 신규 유저 유입 후 유저 속성 업데이트, 이벤트 발생 시나리오

유저가 오프라인 매장을 통해 가입한 이후 마케팅 수신동의를 하였습니다. 해당 유저는 이후 오프라인 매장에서 구매를 하였습니다.

1. 오프라인 매장을 통해 가입 시, [통합 프로필 생성 및 업데이트 API](/api-guide/api/import-api/identity-api/post.md) 를 통해 신규 유저의 프로필을 생성합니다.
2. 가입 이후 마케팅 수신동의 시, [유저 속성 생성 및 업데이트 API](/api-guide/api/import-api/profile/post.md) 를 통해 해당 유저의 마케팅 수신동의 속성을 업데이트합니다.
3. 이후 오프라인 매장에서 구매 시, [이벤트 적재 API](/api-guide/api/import-api/event-api/post.md) 를 통해 해당 유저의 구매 이벤트를 적재합니다.

{% hint style="info" %}
일반적으로 통합 프로필 생성 > 유저 프로필 생성 > 이벤트 적재 API 순으로 호출하는 것이 좋습니다.
{% endhint %}


---

# 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.dfinery.ai/api-guide/undefined-1.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.
