設定 App 內購買項目的稅務類別
讓 Agent 顯示 Apple 為 App 內購買項目提供的稅務類別,為某個購買項目設定它自己的類別,或讓它重新使用 App 的類別。
你的 App 在 App Store Connect 中有一個稅務類別,每個 App 內購買項目都使用它,除非你為該購買項目選擇了另一個類別。Apple 在 Set a tax category for In-App Purchases ↗ 中介紹了這一點。當某個購買項目需要與 App 不同的類別時,Agent 可以向你顯示各個類別、設定你選擇的類別,或讓該購買項目重新使用 App 的類別。
購買項目一開始使用什麼
說明中表示「An In-App Purchase without an explicit selection inherits the parent app’s tax category」(沒有明確選擇的 App 內購買項目會繼承其上層 App 的稅務類別)。Agent 讀取這樣的購買項目時,會顯示「Inherited from parent app」,而該指令不會說明那是哪個類別。要知道這一點,請同時詢問 App 的類別:Agent 會用 asc web apps tax-category view 讀取,說明表示對於沒有自行選擇的 App,它會回報為「App Store Software」。
提出要求
在專案的聊天中提出要求,例如:
Our "Recipe Pack" in-app purchase is a downloadable e-book. Show me its tax category now and the categories that could fit, and set the one I pick.- Agent 找到該購買項目,並用
asc web iap tax-category view讀取它的類別:它自己的類別,或「Inherited from parent app」。 - 它用
asc web iap tax-category list讀取 Apple 為 App 內購買項目提供的類別,也就是 Apple 的 App 內購買項目稅務類別選擇器中的類別和條件,並向你顯示可能適合的名稱。有些類別有子類別,有些類別需要進一步描述產品的條件。 - 你選擇類別,如果有子類別或條件,也一併選擇。Agent 可以給出建議,但哪個類別正確由你決定。
- 設定類別的指令需要
--confirm,所以 Agent 會告訴你它將要設定什麼,並先詢問你。 - 它執行
asc web iap tax-category set。說明表示類別和每個條件「are validated against the ADDON catalog before any write」(在任何寫入之前都會對照 ADDON 目錄進行驗證),並且「The result is re-read and verified.」(結果會重新讀取並驗證)。 - Agent 會告訴你結果:類別、條件、是否有任何變更或原本就已相符,以及 Apple 已確認。
請說出你想要的每一個條件。說明稱條件集是「declarative」(宣告式的):Agent 傳送的條件會取代購買項目原有的條件,不傳送任何條件則會清除它們。
購買項目一旦有了自己的類別,就不再繼承 App 的類別。要隨時查看,請問「Recipe Pack 的稅務類別是什麼?」
重新使用 App 的類別
提出要求,例如:
Make Recipe Pack use the app's tax category again.Agent 會執行 asc web iap tax-category reset。說明表示它「removes the explicit selection so the purchase inherits its parent app’s tax category.」(移除明確的選擇,使購買項目繼承其上層 App 的稅務類別)。它需要 --confirm,所以 Agent 會先詢問你。Apple 的頁面稱之為「Match to parent app」。