B2B Commerce　関係のまとめ

[まとめページに戻る](https://qiita.com/Keiji_otsubo/items/60afc2a8d211b6f7d89f)
[まとめA～M](https://qiita.com/Keiji_otsubo/items/f3ddedee6793bf1576f8)


大事です。　種類がありすぎる....
解説を読んでいても意味が分からんかった理由だな。

+ [Salesforce B2C Commerce 製品（日本語の資料）](https://qiita.com/Keiji_otsubo/items/edf70f5138d72e481f3c)
+ [Commerce の種類がいっぱいあるなぁ　B2C, B2B, B2B2C, B2C Lightning?](https://qiita.com/Keiji_otsubo/items/2d92c76b215e4b82ca96)
+ [B2B AND B2B2C Commerce Data Model](https://qiita.com/Keiji_otsubo/items/404a6ec01d6613afa29e)
+ [B2C Commerce のガイド付き検索リダイレクト機能](https://qiita.com/Keiji_otsubo/items/f7e062f770322fe0aa66)
+ [顧客データプラットフォーム（CDP）の概要](https://qiita.com/Keiji_otsubo/items/30e97b376bdb2918a7a9)


---------------------------------------------------

# Something went wrong. Cancel the current checkout process and try again.Error: desc cannot be blank

+ [B2B checkout flow setup](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007aiyqF)

:::note
After spending some time realized there was an active validation rule which was preventing order creation.

しばらく時間を費やした後、注文の作成を妨げているアクティブな検証ルールがあることに気付きました。
:::

# An unexpected error occurred

+ ["An unexpected error occurred" on trying to create an experience from the B2B template](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000EBfwA)

+ [How can I add products in Cart in b2b commerce cloud ?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007A2O3S)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/77aa427f-6cad-0708-dbef-5f2657e619c5.png)





# You don’t have the right permissions to access the product information. The store admin can help with that.

+ [User Cannot view Products in B2B Lightning Storefront](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000EA46H)

:::note
Check if Buyer Groups are assigned in the related list of your account.

アカウントの関連リストに購入者グループが割り当てられているかどうかを確認します。
:::

# Fulfillment Order

+ [Fulfillment Status Report](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007er6sU)

:::note
Looks like this is still an idea: 

https://ideas.salesforce.com/s/idea/a0B8W00000NLKoTUAX/enable-track-field-history-for-order-summary-and-fulfillment-order
:::


# レコードの追加

+ [Import Products with different Currencies](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000FUfYq)
+ [購入数量ルールを追加する dataloader](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000ISLz2)
+  [Upload product media (images and attachments) in mass via CSV?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V000076AJ7w)
+  [ストアのデータをインポートするための CSV ファイル形式](https://help.salesforce.com/s/articleView?id=sf.comm_store_csv_format.htm&type=5)
+  [ファイルを一括インポートするためのドキュメントやプロセス](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007CtJqU)

:::note
残念ながら、CSV インポート ツールは添付ファイルのアップロードをまだサポートしていません。ただし、この機能は短期的なロードマップに含まれています。

https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000G3H70SAF

私がする必要があったのは、CMS ワークスペースをセットアップし、チャネル経由でコマース サイトに接続することでした。次に、CSV ファイルを取得し、スクリプトを使用してそれを Salesforce JSON 形式に変換し、この方法でアップロードします。これは、JSON で従う必要がある形式へのリンクです。  

https://help.salesforce.com/s/articleView?id=sf.cms_import_content_json.htm&type=5 


次に、ProductMedia オブジェクトへの CSV アップロードを使用して、これによって作成される「ManagedContent」レコードを製品に関連付けることができます。ManagedContent ID は ElectronicMediaId、ProductId は product、ElectronicMediaGroupId は製品画像、リスト画像、またはドキュメントのいずれかを設定する方法です。このために組織 ID を確認する必要がある場合があります。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/0d73daef-a13d-715a-8314-16a3b300a5f2.png)

これは長くて複雑なプロセスですが、幸いなことに製品データは頻繁には変更されないため、一度実行すれば、しばらくは問題なく使用できるはずです。Salesforce experience Cloud のオフィスアワーのウェビナーに参加し、そこの専門家と話をしたところ、基本的にこれが大規模に行うための最良の方法であり、JSON が唯一の選択肢であると言われました。
:::



# マニュアル

[Welcome to the Salesforce B2C Commerce Infocenter 22.9](https://documentation.b2c.commercecloud.salesforce.com/DOC2/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fsearch_engine_optimization%2Fb2c_characters_allowed_in_urls.html)

# There is a problem with a visibility rule on the component. Check the rule conditions, correct the errors, and try again.

+ [There is a problem with a visibility rule on the component](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000PfEiM)

:::note
Update: the problem was solved on its own after a couple of days. I still don't know the reason of the error and can't reproduce it anymore.
:::

# 練習できる環境はなさそう

+ [Hi all, Is there a developer edition or an org with sample data to gain some hands on the b2b commerce experience? Thanks](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V000074ru6Z)

:::note
Unfortunately, I don't believe there are any free Trailhead or Developer Orgs for Commerce Cloud at the moment.  It seems like the only you would have to get a sandbox would be to become a Commerce Cloud customer and use the sandboxes you would gain access to.

Also, if you haven't checked it out already, here is a link to a Commerce Cloud trail that has a module on B2B Commerce: https://trailhead.salesforce.com/en/content/learn/trails/cc-overview. 

https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8ysKSAR
:::

# ライセンス

+ [Failure : Can't assign permission set „name of permission set“ to user XY. The user license doesn't allow the permission: Edit Dataset Recipes.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V000079Rygm)

:::note
The setup process for B2B Marketing Analytics varies based on when the feature was purchased or previously set up. Your permission set license affects how you enable B2B Marketing Analytics. To get the newest tools and data after the initial setup, users must update their apps periodically.

Prerequisites for B2B Marketing Analytics
https://help.salesforce.com/s/articleView?id=sf.pardot_b2bma_setup_prereqs.htm&type=5
:::

+ [B2BMA 統合ユーザーには、Salesforce のカスタム オブジェクトにレコードを作成する権限がありません](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007PvWNw)

:::note
権限セットを作成する場合、権限セットが適用されるライセンスの種類を選択する必要はありません。選択リストを空のままにして次に進むことができます。代替オプションとして、既存のプロファイル内にアクセス許可を適用することもできます。 

私もちょうどこれと同じ問題に遭遇しました。Account Engagement でカスタム オブジェクトを作成したいと考えていましたが、これには標準 B2BMA ユーザーに Salesforce のカスタム オブジェクトへの読み取りアクセス権が必要でした。プロファイルを編集してオブジェクト レベルのアクセスを追加できませんでした。


ライセンス タイプを選択せず​​に権限セットを作成し、権限セットにオブジェクト レベルのアクセスをプロビジョニングし、その権限セットを B2BMA 統合ユーザーに割り当てました。これで問題は解決し、そこからカスタム オブジェクトを作成できるようになりました。
:::


# エラー

+ [Product price is not visible at the storefront in b2b sfcc](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007CGce4)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/9f1383ca-8433-9b10-12d8-8e92c3d38be5.png)

:::note
Looks like you need to add permission sets.
Please add buyer/shopper permission set to the user
:::

+ [When I logged in as guest user in B2B commerce I can't see product .](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007EYQUC)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/01d83657-fadd-40ad-380c-5d925f020cdf.png)

:::note
Please check this article.

https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000FvSjuSAF

Allow a B2B Commerce for Visualforce Guest Buyer to Browse Your Storefront
https://help.salesforce.com/s/articleView?id=sf.b2b_commerce_guest.htm&type=5
:::

+ [Einstein Activity Tracking【未解決】](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007FUntF)

+ [B2BMA dataflow warning](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007PxT0a)

:::note alert
 The dataflow was completed, but the augment_Account_User_EWCUA node didn't augment any columns. Either the node didn't find any matches, or a join key contains only null values. The dataflow was completed, but the augment_Contact_EWCUA node didn't augment any columns. Either the node didn't find any matches, or a join key contains only null values. The dataflow was completed, but the augment_Event_Account_EWCUA node didn't augment any columns. Either the node didn't find any matches, or a join key contains only null values. Data Sync isn’t scheduled for the SFDC_Local connection used in this job. Your data is only as up to date as the last manual sync. Schedule Data Sync from the Connect tab to make sure the job has the latest data. 
 :::

 :::note
 Please check this article.

Dataflow warning: 'The dataflow was completed, but the node didn't augment any columns'
https://help.salesforce.com/s/articleView?id=000383227&type=1
:::

+ [Issue: B2B commerce related](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007NC3ZY)

:::note alert
Specify value for 'StockKeepingUnit' for Product and try again.

Couldn't read csv file.:InvalidJobState : Job has been set to terminal state:InvalidJobState : Job has been set to terminal state
:::


+ [Error message: "..."message":"useCheckoutComponent is not defined"..."](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007PzE0D)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/20a26347-8150-2833-70ca-31a4af167cc6.png)

:::note
This is what I found in one of the Quips regarding what you are seeing. I never tried it but I hope it helps.

The Sample Custom Checkout Component documentation is still catching up. The code has an import statement for CheckoutComponentBase but the class declaration extends useCheckoutComponent (LightningElement) (so CheckoutComponentBase is never used). If you try to deploy this sample component as is it throws an error when adding it to experience builder. The component needs to extend that checkout component base, and then there is a stage action method that needs to be implemented. Some partners have reported success switching all our LWCs to work in the Layout Accordion component. The correct syntax is: export default class Lwr_simple_component extends CheckoutComponentBase {. If you have previously relied on checkoutMode with the old Checkout component, you may be able to replicate similar functionality using the setAspect method.
:::