Working with Selling API Events - AWS Partner Central

Working with Selling API Events

Selling API events in AWS Partner Central API provide real-time notifications about changes in the status or details of opportunities. These events are useful for keeping your systems in sync with AWS Partner Central, ensuring timely responses and updates.

Amazon EventBridge

Amazon EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources. EventBridge simplifies the process of building event-driven architectures, allowing you to ingest, filter, and route events seamlessly.

Learn more about the Amazon EventBridge User Guide.

How to listen

Listening to Selling API events requires setting up an EventBridge rule in the N. Virginia (us-east-1) region that matches the events you are interested in.

AWS console setup

Follow the steps in the Creating a Rule guide to set up an EventBridge rule through the AWS Management Console.

SDK setup

You can also create and manage EventBridge rules programmatically using the AWS SDKs. Here is an example of how you might do this using the AWS SDK for Python (Boto3):

import boto3 client = boto3.client('events') response = client.put_rule( Name='MyOpportunityCreatedRule', EventPattern= '{ "source": ["aws.partnercentral-selling"], "detail-type": ["Opportunity Created"], "detail": {"catalog": ["AWS"]} }', State='ENABLED' ) print('Rule ARN:', response['RuleArn'])

Types of events

  1. Opportunity Created: Triggered when a new opportunity is created.

  2. Opportunity Updated: Triggered when an opportunity (Opportunity or its corresponding AWS Opportunity Summary) is updated.

  3. Engagement Invitation Created: Triggered when an AWS Referral invitation is created.

  4. Engagement Invitation Accepted: This event is triggered when a partner accepts an AWS Engagement Invitation, confirming their interest in collaborating with AWS on the opportunity.

  5. Engagement Invitation Rejected: This event is triggered when an AWS Engagement Invitation is rejected.

Example Opportunity event

{ "version": "1", "id": "d1example-0c9c-4655-15bf-c5exampleb08", "source": "aws.partnercentral-selling", "detail-type": "Opportunity Created", "time": "2023-10-28T13:31:05Z", "region": "us-east-1", "account": "123456789123", "detail": { "schemaVersion": "1", "catalog": "AWS", "opportunity": { "identifier": "O1234567" } } }

Example Engagement Invitation event

{ "version": "1", "id": "d1example-0c9c-4655-15bf-c5exampleb08", "source": "aws.partnercentral-selling", "detail-type": "Engagement Invitation Created", "time": "2023-10-28T13:31:05Z", "region": "us-east-1", "account": "123456789123", "detail": { "schemaVersion": "1", "catalog": "AWS", "invitation": { "arn": "arn:aws:partnercentral:us-east-1:aws:catalog/Sandbox/engagement-invitation/engi-zxCwxvAga" } } }

Example rules

Opportunity Created

{ "source": ["aws.partnercentral-selling"], "detail-type": ["Opportunity Created"], "detail": { "catalog": ["AWS"] } }

Opportunity Updated

{ "source": ["aws.partnercentral-selling"], "detail-type": ["Opportunity Updated"], "detail": { "catalog": ["AWS"] } }

Engagement Invitation Created

{ "source": ["aws.partnercentral-selling"], "detail-type": ["Engagement Invitation Created"], "detail": { "catalog": ["AWS"] } }

Engagement Invitation Accepted

{ "source": ["aws.partnercentral-selling"], "detail-type": ["Engagement Invitation Accepted"], "detail": { "catalog": ["AWS"] } }

Engagement Invitation Rejected

{ "source": ["aws.partnercentral-selling"], "detail-type": ["Engagement Invitation Rejected"], "detail": { "catalog": ["AWS"] } }

All events

{ "source": ["aws.partnercentral-selling"], "detail": { "catalog": ["AWS"] } }