assignOpportunity method
Enables you to reassign an existing Opportunity to another
user within your Partner Central account. The specified user receives the
opportunity, and it appears on their Partner Central dashboard, allowing
them to take necessary actions or proceed with the opportunity.
This is useful for distributing opportunities to the appropriate team members or departments within your organization, ensuring that each opportunity is handled by the right person. By default, the opportunity owner is the one who creates it. Currently, there's no API to enumerate the list of available users.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter assignee :
Specifies the user or team member responsible for managing the assigned
opportunity. This field identifies the Assignee based on the
partner's internal team structure. Ensure that the email address is
associated with a registered user in your Partner Central account.
Parameter catalog :
Specifies the catalog associated with the request. This field takes a
string value from a predefined list: AWS or
Sandbox. The catalog determines which environment the
opportunity is assigned in. Use AWS to assign real
opportunities in the Amazon Web Services catalog, and Sandbox
for testing in secure, isolated environments.
Parameter identifier :
Requires the Opportunity's unique identifier when you want to
assign it to another user. Provide the correct identifier so the intended
opportunity is reassigned.
Implementation
Future<void> assignOpportunity({
required AssigneeContact assignee,
required String catalog,
required String identifier,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSPartnerCentralSelling.AssignOpportunity'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Assignee': assignee,
'Catalog': catalog,
'Identifier': identifier,
},
);
}