# 変数について

**URL:** <https://community.shopify.com/t/topic/10574>\
**Category:** 技術的なQ＆A\
**Created:** [April 1, 2020, 2:01pm UTC](https://community.shopify.com/t/topic/10574 "2020-04-01T14:01:07Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

Shopifyで外部ASPのアフィリエイト連携を進める中で、注文番号・商品ID・商品名・商品単価・数量・合計販売金額といった「変数」をどこで確認できるかが質問された。  

回答では、まずASP側が求める「変数」が何を指すのかを技術担当に確認すべきと整理されている。  
・API経由で取得したい情報なら、ShopifyのAdmin API（GraphQL）のorder関連ドキュメントを参照  
・テーマ内で使うLiquid変数なら、Liquidのorderオブジェクトのリファレンスを参照  

つまり、必要な項目自体はShopifyの注文データに関係するが、取得方法は「API」か「Liquid」かで参照先が異なるという案内。  

現時点では具体的な変数名の確定まではされておらず、ASP側の実装方式を確認したうえで参照先を絞る必要がある。

<div class="post-metadata">

**Author:** ![kw1](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@kw1](https://community.shopify.com/u/kw1)\
**Post date:** [April 1, 2020, 2:01pm UTC](https://community.shopify.com/t/topic/10574/1 "2020-04-01T14:01:07Z")

</div>

Shopifyでアフィリエイトシステムを利用したく、外部ASP様と掛け合っております。

システム調整に当たって、ASP様より下記項目の変数を知りたいと連絡が来他のですが、これらの項目はどちらから確認可能でしょうか？もしくはどなた様かご回答を頂くことは可能でしょうか？

・注文番号  
・商品ID  
・商品名  
・商品単価  
・数量  
・合計販売金額

以上よろしくお願い致します。

---

<div class="post-metadata">

**Author:** ![junichiokamura](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/junichiokamura/32/299737_2.png) [@junichiokamura](https://community.shopify.com/u/junichiokamura)\
**Post date:** [April 7, 2020, 4:10pm UTC](https://community.shopify.com/t/topic/10574/2 "2020-04-07T16:10:06Z")

</div>

変数が具体的に何を指すかASP様の技術がわかる方に確認された方がよろしいと思いますが、

変数＝APIの場合、以下の資料に記載されています。

[https://shopify.dev/docs/admin-api/graphql/reference/object/order](https://shopify.dev/docs/admin-api/graphql/reference/object/order)

変数＝テーマ内のLiquid（ストアのページテンプレート内で取得できる変数）の場合、以下となります。

[https://shopify.dev/docs/themes/liquid/reference/objects/order](https://shopify.dev/docs/themes/liquid/reference/objects/order)
