# 2. 회원가입 즉시, 유저에게 등급을 주고 싶어요.

**아래의 과정은 유저의 등급을 앱 화면에서 표기해 주는 것은 아니며, 유저의 데이터에 '등급'이라는 값을 추가 시켜주는 과정이에요. (관리자 웹과 앱 화면에 노출시키기 위해서는 별도의 과정이 필요해요.)**

1. 데이터를 등록하기 위해서는 항목을 만들어 줘야 해요. ( [항목 만드는 법](https://docs.ohmyapp.io/main/class/puppy-app/2)을 확인 후, 항목을(ex.등급) 먼저 만들어 주세요.)
2. 관리자 웹 > 로직 설정 > '+' 버튼을 클릭해 새로운 로직을 생성해 주세요.
3. 아래와 같이 입력해 주세요.&#x20;
   * If When : Data is created
   * Where : \_users
   * Then : Updated Data
4. Then 아래, To do를 펼쳐 아래와 같이 입력해 주세요.&#x20;
   * Collection for Data Update : \_users
5. Data Search Condition to Update : 항목 ID에 '\_id' 입력 , 항목 값에 'newDocument.\_id'를 입력해 주세요.&#x20;

   > users 컬렉션에 있는 id 항목의 값이 newDocument.\_id인 값을 검색 해요. (newDocument.\_id 입력 시, 앞에서 선택한 값에 따라 다르게 표현될 수 있어요.)

<div align="left"><figure><img src="https://3976660509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDgfvhQgmY9NbRK0Sln7j%2Fuploads%2FgJb6GZSfJZ1dXzF3mp1O%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202024-01-11%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%202.50.38.png?alt=media&#x26;token=afee11c2-4c60-47a9-9263-874f153609f9" alt="" width="563"><figcaption></figcaption></figure></div>

6. Data to update : Item 1 > 항목 ID에 수정을 원하는 [항목ID ](https://docs.ohmyapp.io/main/guide/dictionary/item-id)입력 (ex. grade) , 항목 값에 원하는 값 (ex. bronze)입력 후 Save 버튼을 클릭해 주세요.&#x20;

> 검색 조건에 해당하는 데이터의 "grade" 항목의 값을 "bronze"로 수정해요.

<div align="left"><figure><img src="https://3976660509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDgfvhQgmY9NbRK0Sln7j%2Fuploads%2FyhBNRgzB4lbrWzlxCzyQ%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202024-01-11%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%202.56.25.png?alt=media&#x26;token=5fa2543e-7306-4d15-8654-2072ee8ac8fd" alt="" width="563"><figcaption></figcaption></figure></div>

* 로직 생성 이후에 회원가입하는 유저에게 적용돼요. (로직 생성 전 회원가입된 유저에게는 적용되지 않아요.)

> \#로직, #로직 설정하는 방법,#로직 설정, #로직 생성, #회원 등급 설정하기, #유저 등급 부여하기, #회원 등급 설정하는 방법

2023.08.02 Jinny<br>

###

### As soon as I sign up, I want to be able to rate the user.

**The process outlined below does not immediately display the user's grading on the app page but adds a value called 'grade' to the user's data. (A separate process is needed to make this grade visible on the administrator's web and app pages.)**

1. To record the data, you need to create an item. (After understanding how to create an item, please proceed to create the item; for example, 'Rating.')

2. Access Administrator Web > Development Mode > Logic Settings > Create New Logic on the left side.

3. Select user information (\_users) from the " \_" section in the center of the page. Then choose 'register' from the corresponding field.

4. &#x20;In the 'Do\_' section, opt for 'Modify existing data' within '\_.'"

5. &#x20;Select 'Modify existing data' within '\_ ' in the 'Do\_' section.

6. Click 'Flow Options' on the right, and choose '\_users' for the collection name.

7. \[Search conditions for documents you want to modify] > Item 1 > Enter '\_id' in the Item ID field > Enter 'newDocument.\_id' in the Item value field.

8. &#x20;\[Modify the contents] > Item 1 > Enter the Item ID you want to modify (e.g., 'grade') > Enter the desired value (e.g., 'gold') for the item's value > Click the Create button located at the top center.

9. &#x20;This change applies to users who sign up after logic generation. (It does not affect subscribers who signed up before the logic was created)

> \#logic settings, #logic generation, #membership grading, #user grading, #how to set membership grading

2023.08.18 Song
