# 通知

NMKR Studioでは、プロジェクトからの売上が成功した場合、お客様に通知を送信することができるようになりました。

通知は電子メールやWebhook経由で送信できます。

この機能はまだベータ版ですので、何か問題がありましたら、[お知らせ](https://nmkr.io/support)ください。

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

### プロジェクトに通知を設定する

通知はプロジェクトごとに個別に有効にすることができます。プロジェクトの[編集セクションに](https://docs.nmkr.io/nmkr-studio/project/edit)ある「notifications（通知）」タブに移動してください。「notifications」をクリックしください。

<figure><img src="/files/Ad4M1ITCflHE899wKSvb" alt=""><figcaption><p>プロジェクトの編集セクションの通知タブ</p></figcaption></figure>

#### 電子メールによる通知

ドロップダウンメニューから電子メールを選択し、ご希望のメールアドレスを入力して通知を有効にします。そして「save」をクリックしてください。

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

通知タブの「save changes」をクリックして、新しく追加した通知を保存します。これで、プロジェクトNFTの販売成功に関する通知メールが届くようになります。

{% hint style="info" %}
たくさんの電子メールを受信する可能性がありますので、電子メールプロバイダーで@nmkr.ioのドメインをホワイトリストに登録してください。
{% endhint %}

#### Webhookによる通知

Webhookは、HTTPを使用して、2つのアプリケーションプログラミングインターフェース（API）間の軽量でイベント駆動型の通信を可能にするコールバック関数です。

Webhookによる通知を有効にするには、ドロップダウンでWebhookを選択してください。

APIのURLを入力し、シークレットキーを入力します。

通知を有効にし、「OK」をクリックしてください。

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

通知タブで「save changes」をクリックし、新しく追加された通知を保存します。

**応答クラス**

Webhookは、プロジェクト内のすべての販売に対して呼び出されます。送信される応答クラスを以下に示します：

```
public enum NotificationEventTypes
    {
        transactionconfirmed,
        transactionfinished,
        transactioncanceled,
    }

    public class NotificationSaleNft
    {
        public string NftUid { get; set; }
        public string NftName { get; set; }
        public string NftNameInHex { get; set; }
        public string AssetId { get; set; }
        public string PolicyId { get; set; }
        public long Count { get; set; }
        public long Multiplier { get; set; }
    }

    public class NotificationSaleClass
    {
        [JsonConverter(typeof(StringEnumConverter))]
        public NotificationEventTypes EventType { get; set; }
        public string ProjectName { get; set; }
        public string ProjectUid { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public TransactionTypes SaleType { get; set; }
        public DateTime SaleDate { get; set; }
        public long Price { get; set; }
        public long? MintingCosts { get; set; }
        public long? SendbackCosts { get; set; }
        public long? NetworkFees { get; set; }
        public long? NMKRRewards { get; set; }
        public long? Discount { get; set; }
        public NotificationSaleNft[] NotificationSaleNfts { get; set; }
        public string TxHash { get; set; }
        public string ReceiverAddress { get; set; }
        public string OriginatorAddress { get; set; }
        public string StakeAddressReceiver { get; set; }
        public object DetailResults { get; set; }
    }
```

ペイロードの例

```
{
  "EventType": "transactionconfirmed",
  "ProjectName": "a project",
  "ProjectUid": "9e2d000a-ed53-4db4-819b-xyz123456",
  "SaleType": "paidonprojectaddress",
  "SaleDate": "2022-11-23T12:14:43",
  "Price": 10000000,
  "MintingCosts": 2000000,
  "SendbackCosts": 2000000,
  "NetworkFees": 203341,
  "NMKRRewards": 0,
  "Discount": null,
  "NotificationSaleNfts": [
    {
      "NftId": 123456,
      "NftUid": "0f79ae64-aad4-4dcf-9b22-xyz1234",
      "NftName": "Thetoken0001",
      "NftNameInHex": "546865746F6B65630303031",
      "AssetId": "9ae5eba7256cdd1f51834676dcde4f1fea491e8adbb00ea632fb788e54686xyz12345677",
      "PolicyId": "9ae5eba7256cdd1f51834676dcde4f1fea491e8adbbxyz123456",
      "Count": 1,
      "Multiplier": 1
    }
  ],
  "TxHash": "b08aad615f599c80a243882330c99d33e07f443ca1b4d043f448bfxyz1234",
  "ReceiverAddress": "addr_test1qrqtawercjsj29xyq4kssxeru6s33y68kwmh8tj00q4vkhaeucuvwvhegqxf6ka0ewy0pallk044nnrtsj8zxyz1234",
  "OriginatorAddress": "addr_test1qrqtawercjsj29xyq4kssxeru6s33y68kwmh8tj00q4vkhaeucuvwvhegqxf6ka0ewy0pallk044nxyz1234",
  "StakeAddressReceiver": "stake_test1uzu7vwx8xtu5qryatwhuhz8s7llm866ee34cfr3tukxyz1234",
  "DetailResults": null,
  "Metadata": "{\n  \"721\": {\n    \"9ae5eba7256cdd1f51834676dcde4f1fea491e8adbbxyz123456\": 
  {\n      \"Thetoken0001\": {\n        \"name\": \"Thetoken0001\",\n        
  \"image\": \"ipfs://QmUojMDe1hviWNcL5o23xTiQUBiKaFmVxyz123456\",\n        
  \"mediaType\": \"image/jpeg\",\n        \"description\": \"\",\n        
  \"files\": [\n          {\n            \"name\": \"Thetoken0001\",\n            
  \"mediaType\": \"image/jpeg\",\n           
   \"src\": \"ipfs://QmUojMDe1hviWNcL5o23xTiQUBiKaFmVT6yxyz1234\"\n          
   }\n        ]\n      }\n    },\n    \"version\": \"1.0\"\n  }\n}"
}
```


---

# 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.nmkr.io/jp/nmkr-studio/purojekuto/tong-zhi.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.
