--cleanup-feed

在重新索引並將資料傳送到SaaS之前,請清理摘要索引器表格。 僅支援productsproductAttributesproductOverridesinventoryStockStatuspricesvariantscategoryPermissions

如果與--dry-run選項搭配使用,該作業會針對所有專案執行試執行重新同步作業。

重要
僅在環境清理後使用,或搭配--dry-run選項使用。 如果用於其他情況,清理操作可能會導致資料遺失和資料同步問題。

範例:

bin/magento saas:resync --feed products --cleanup-feed

--continue-resync

繼續執行中斷的重新同步作業。 僅支援productsproductAttributesproductOverrides摘要。

範例:

bin/magento saas:resync --feed productAttributes --continue-resync

--dry-run

執行摘要重新索引程式,而不將摘要提交至SaaS且不儲存至摘要表格。 此選項對於識別資料集的任何問題很有用。

新增EXPORTER_EXTENDED_LOG=1環境變數以將裝載儲存至var/log/saas-export.log

範例:

EXPORTER_EXTENDED_LOG=1 bin/magento saas:resync --feed products --dry-run

測試特定摘要專案

--by-ids選項與擴充的記錄集合一起新增,以測試特定的摘要專案,在var/log/saas-export.log檔案中檢視產生的裝載。

範例:

EXPORTER_EXTENDED_LOG=1 bin/magento saas:resync --feed products --dry-run --by-ids='ADB102,ADB111,ADB112'

測試所有摘要專案

依預設,在resync --dry-run作業期間提交的摘要僅包含新專案,或先前無法匯出的專案。 若要在要處理的摘要中包含所有專案,請使用--cleanup-feed選項。

範例

bin/magento saas:resync --feed products --dry-run --cleanup-feed

--feed

必填。 指定要重新同步的摘要實體。

可用的摘要:

  • categories
  • categoryPermissions
  • orders
  • prices
  • products
  • productAttributes
  • productOverrides
  • scopesWebsite
  • scopesCustomerGroup
  • variants
注意
根據您的Adobe Commerce環境中安裝的模組,環境中可用的摘要可能會不同。

範例:

bin/magento saas:resync --feed products

--no-reindex

重新提交現有的目錄資料至Commerce Services,而不重新索引。 不支援產品相關摘要。

行為因匯出模式而異:

  • 舊版模式:重新提交所有資料而不截斷。
  • 立即模式:忽略選項,僅同步更新/失敗。

範例:

bin/magento saas:resync --feed productAttributes --no-reindex

--id-type=ProductId

依照預設,當您使用包含saas:resync feed選項的--by-ids命令時所指定的實體是由產品SKU所指定。 使用--id-type=ProductId選項,依產品ID指定實體。

bin/magento saas:resync --feed products --by-ids='1,2,3' --id-type='productId'

範例:

疑難排解

如果您在連線的Commerce服務中未看到預期的資料,請檢查資料匯出錯誤記錄檔,並使用saas:resync命令搭配環境變數來檢閱裝載和效能分析工具資料,以疑難排解問題。 檢視檢閱記錄檔及疑難排解