選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

Best practices - AWS Partner Central
此頁面尚未翻譯為您的語言。 請求翻譯

Best practices

Reacting to events

When handling events from AWS Partner Central API, ensure that your processing logic is idempotent to handle duplicate events. Instead of making immediate GetOpportunity calls for each event, consider batching or selectively fetching details based on your application's needs. For uninterrupted operations, beware of Quotas.

Implementing optimistic locking

Optimistic locking prevents unintended data overrides during concurrent updates. Here's a typical scenario:

  1. Partner retrieves an opportunity from their CRM system.

  2. User A updates the opportunity on AWS Partner Central.

  3. User B updates the same opportunity at the same time through the CRM integration.

  4. If the data changes, the CRM system attempts to upload the data but returns a ConflictException.

  5. User reviews the error and manually resolves conflicting data.

To avoid this scenario, all UpdateOpportunity requests must include the LastModifiedDate parameter, which you can obtain from previous CreateOpportunity, UpdateOpportunity, and GetOpportunity actions. The update succeeds only if LastModifiedDate matches our system. If it doesn't, you must fetch the latest LastModifiedDate using GetOpportunity and reattempt the update.

Synchronizing data between CRM and AWS Partner Central

It is essential to keep your system synced with the latest data from Partner Central. The following are two strategies to ensure your system reflects the latest data:

Using events (recommended)

  1. Load data using ListOpportunities.

  2. Subscribe to opportunity events.

  3. Respond to new opportunities or changes.

  4. Fetch the latest data with GetOpportunity when you receive Opportunity Created, Opportunity Updated, or Opportunity Accepted events.

  5. Remove opportunities from your system upon receiving Opportunity Rejected events.

Using ListOpportunities polling

  1. Load data using ListOpportunities.

  2. Choose a polling frequency, ensuring it is not too frequent to avoid exhausting your daily read quota.

  3. Identify the latest LastModifiedDate from your stored data, ensuring it originates from AWS.

  4. Use the timestamp in the AfterLastModifiedDate filter when calling ListOpportunities.

    { "FilterList": [ { "Name": "AfterLastModifiedDate", "ValueList": [ "2023-05-01T20:37:46Z" ] // Replace with actual timestamp of your last synced data } ] }
  5. AWS will return opportunities created or updated after the value indicated on the timestamp.

  6. Iterate over all returned pages using NextToken, and update your system's data using GetOpportunity.

    { "NextToken": "AAMA-EFRSN...PZa942D", "FilterList": [ { "Name": "AfterLastModifiedDate", "ValueList": [ "2023-05-01T20:37:46Z" ] // Replace with actual timestamp of your last synced data } ] }
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。