# 라인 아이템 설정

{% hint style="danger" %}
버전 1.39부터 제품 옵션 기능을 더 이상 지원하지 않습니다. 단, 기존에 설치되어 제품 옵션 기능을 사용 중인 조직에서는 계속 사용할 수 있습니다.
{% endhint %}

구성 제품의 라인 아이템과 옵션 제품의 라인 아이템 간 연결할 필드를 설정하고 옵션 정보를 저장할 라인 아이템 필드를 매핑하는 작업을 수행합니다.

<figure><img src="/files/nVuLAttio0pNCcB4gwKf" alt=""><figcaption></figcaption></figure>

### 상위 라인 아이템 필드

구성 제품 라인 아이템과 해당 옵션 라인 아이템을 연결할 필드를 설정합니다. 이 필드는 **Self-Relationship**이여야 하며, Self-Relationship은 **동일한 개체 내에서 레코드 간의 관계를 나타내는 구조**로, 한 레코드가 같은 개체의 다른 레코드를 참조할 수 있도록 설정하는 관계입니다.

{% hint style="info" %}
**기회 제품**에서는 **Base Line Item for Option**(`SBLI__BaseLineItemForOption__c`) **필드**를 기본적으로 제공합니다. 기회에 대한 스탠다드 설정을 진행한 경우, 이 필드가 상위 라인 아이템 필드로 자동 설정됩니다.

필요에 따라 다른 필드로 대체할 수 있습니다.
{% endhint %}

<figure><img src="/files/ahuUTsYrza1T8NBPgqCu" alt="" width="367"><figcaption></figcaption></figure>

#### 예시

{% hint style="info" %}
이 예시에서는 기회 제품에 대한 라인 아이템 편집기를 설정하였습니다.

* **부모:** 기회(`Opportunity`)
* **라인 아이템:** 기회 제품(`OpportunityLineItem`)
* **조회:** 가격 목록 항목(`PricebookEntry`)
  {% endhint %}

상위 라인 아이템 필드를 Base Line Item for Option(`SBLI__BaseLineItemForOption__c`)로 설정했다고 가정하면, 아래 다이어그램과 같은 Self-Relationship 구조가 형성됩니다.

이 설정을 통해 옵션으로 생성된 기회 제품 레코드가 구성 제품의 기회 제품 레코드를 해당 필드를 통해 참조하게 됩니다.

<figure><img src="/files/eUlBHvGervu2V9J8576g" alt="" width="375"><figcaption></figcaption></figure>

#### 라인 아이템 편집기 화면 예시

<figure><img src="/files/wIUNqLORysbutEnvv5Hl" alt=""><figcaption></figcaption></figure>

### 옵션 값을 라인 아이템 필드에 매핑

<figure><img src="/files/IYa0IIjJQprGSZ1hsobH" alt="" width="367"><figcaption></figcaption></figure>

선택한 옵션 정보를 라인 아이템의 어느 필드에 매핑할지 설정합니다. 옵션에서는 다음과 같은 정보를 제공합니다:

<table><thead><tr><th width="159">필드</th><th width="377">용도</th><th width="139">유형</th><th>필수</th></tr></thead><tbody><tr><td><strong>Option Record Id</strong></td><td><p>선택한 제품 옵션의 레코드 ID입니다. 해당 값은 라인 아이템에 저장되며, 편집기에서 라인 아이템을 조회할 때 이 옵션 레코드 ID를 참조하여 필요한 옵션 정보를 가져옵니다.</p><p><br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> <strong>기회 제</strong>품에서<strong>는 Product Option</strong>(<code>SBLI__ProductOption__c</code>) <strong>필드</strong>를 기본적으로 제공합니다. 기회에 대한 스탠다드 설정을 진행한 경우, 이 필드가 자동으로 설정됩니다. 필요에 따라 다른 필드로 대체할 수 있습니다.</p></td><td>조회(제품 옵션)</td><td><mark style="color:red;">✔</mark></td></tr><tr><td><strong>Original Price</strong></td><td>정가를 매핑하려는 경우, 라인 아이템에서 저장할 <strong>정가 필드</strong>를 선택합니다.<br>만약 편집기에서 <strong>표시 용도</strong>로만 사용하려는 경우, <strong>라인 아이템에 추가한 열 중 정가로 사용된 필드</strong>를 지정하면 됩니다.</td><td>통화</td><td></td></tr><tr><td><strong>Unit Price</strong></td><td>단가를 매핑하려는 경우, 라인 아이템에서 저장할 <strong>단가 필드</strong>를 선택합니다.</td><td>통화</td><td></td></tr><tr><td><strong>Quantity</strong></td><td>수량을 매핑하려는 경우, 라인 아이템에서 저장할 <strong>수량</strong> <strong>필드</strong>를 선택합니다.</td><td>숫자</td><td></td></tr><tr><td><strong>Total Price</strong></td><td><p>옵션의 단가와 수량을 계산하여 산출된 총액입니다. 해당 값을 저장하려면 라인 아이템에서 저장할 총액 필드를 선택하세요.</p><p>만약 편집기에서 <strong>표시 용도</strong>로만 사용하려는 경우, <strong>라인 아이템에 추가한 열 중 총액으로 사용된 필드</strong>를 지정하면 됩니다.</p></td><td>통화</td><td></td></tr><tr><td><strong>Discount (%)</strong></td><td>할인율(%)을 매핑하려는 경우, 라인 아이템에서 저장할 <strong>할인율(%) 필드</strong>를 선택합니다.</td><td>백분율</td><td></td></tr><tr><td><strong>Discount (Amount)</strong></td><td>할인가을 매핑하려는 경우, 라인 아이템에서 저장할 <strong>할인가 필드</strong>를 선택합니다.</td><td>통화</td><td></td></tr><tr><td><strong>Description</strong></td><td>옵션 설명에 대한 정보를 매핑하려는 경우, 라인 아이템에서 저장할 <strong>설명 필드</strong>를 선택합니다.</td><td>긴 텍스트 영역(1000)</td><td></td></tr></tbody></table>

#### 예시

{% hint style="info" %}
이 예시에서는 기회 제품에 대한 라인 아이템 편집기를 설정하였습니다.

* **부모:** 기회(`Opportunity`)
* **라인 아이템:** 기회 제품(`OpportunityLineItem`)
* **조회:** 가격 목록 항목(`PricebookEntry`)
  {% endhint %}

기회 제품에 옵션 값을 아래와 같이 매핑하였습니다:

<figure><img src="/files/DH50NazBQHIA8pv9cnqz" alt=""><figcaption></figcaption></figure>

| 옵션 값             | 기회 제품 필드                       |
| ---------------- | ------------------------------ |
| Option Record ID | 제품 옵션 `SBLI__ProductOption__c` |
| Original Price   | 정가 `ListPrice`                 |
| Unit Price       | 단가 `UnitPrice`                 |
| Quantity         | 수량 `Quantity`                  |
| Total Price      | 총액 `TotalPrice`                |

#### 라인 아이템 편집기 화면 예시

구성 제품인 **Desktop PC Intel i3**의 RAM 옵션으로 **RAM 8GB**를 선택합니다. 해당 옵션의 수량은 **1**이며, 정가와 단가는 동일하게 **$45**입니다.

<figure><img src="/files/EqH85QPygE82K0tLEfbx" alt=""><figcaption></figcaption></figure>

선택한 후 추가된 라인 아이템을 확인하면, 앞서 매핑한 필드에 수량, 정가, 단가, 총액의 값이 할당된 것을 확인할 수 있습니다.

<figure><img src="/files/1tE9w9j8eQ0dZ5Zg9aDF" alt=""><figcaption></figcaption></figure>


---

# 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://help.smallbuilder.com/ko/smallbuilder-line-items/product-option/setup/configure-product-options/line-item-setting.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.
