【ShopifyFlow】顧客メタフィールドの値を顧客タグに反映

Shopify Flow以下を実現したいのですが可能でしょうか?

ご教示いただければ幸いです。


注文があったときに

注文した顧客の顧客タグに

既に『_tag』を含んだ顧客タグがあった場合はそのタグを削除。

その上で、特定の顧客メタフィールド(例:customer.metafields.rank.info)の値を

値の末尾に『_tag』と付けた状態で、新規顧客タグとして入れる。

例:メタフィールドの値が『GOLD』だったとき
GOLD_tagという顧客タグが入る。

試作していませんが以下のようにすれば対応できるのではと思います。

  1. Order create トリガー
  2. Condition で order > customer > metafileds > 値(GOLD)を入力
  3. Remove customer tags
  4. Add customer tags

Condition に関しては以下などの情報を探して参照ください。

https://help.shopify.com/ja/manual/shopify-flow/reference/conditions

https://community.shopify.com/c/%E6%8A%80%E8%A1%93%E7%9A%84%E3%81%AAq-a/shopify-flow%E3%81%A7%E3%83%A1%E3%82%BF%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E5%80%A4%E3%82%92%E6%9D%A1%E4%BB%B6%E3%81%AB%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AB%E3%81%A4%E3%81%8D%E3%81%BE%E3%81%97%E3%81%A6/m-p/1713926

(上記はCusotmerに読み替え可能です)

以上ですが、よくわからない場合はShopifyサポートに相談したり、エキスパートやパートナーに依頼されることをお勧めします。

回答ありがとうございます!

すみません…質問後も試行錯誤していた結果下記の方法で解決いたしました。

いただいたCondition の記事につきましては別のFlowを組む際の参考にさせていただきます。

ありがとうございました。


●Order create トリガー
●Remove customer tags
{% for tag in order.customer.tags %} {% if tag contains ‘_tag’ %} {{tag}} {% endif %} {% endfor %}

●Add customer tags
{% for metafields_item in order.customer.metafields %} {% if metafields_item.key == ‘info’ %} {{metafields_item.value}}_tag {% endif %} {% endfor %}