Skip to content

/AWS1/CL_PTS=>CREATEOPPORTUNITY()

About CreateOpportunity

Creates an Opportunity record in Partner Central. Use this operation to create a potential business opportunity for submission to Amazon Web Services. Creating an opportunity sets Lifecycle.ReviewStatus to Pending Submission.

To submit an opportunity, follow these steps:

  1. To create the opportunity, use CreateOpportunity.

  2. To associate a solution with the opportunity, use AssociateOpportunity.

  3. To start the engagement with AWS, use StartEngagementFromOpportunity.

After submission, you can't edit the opportunity until the review is complete. But opportunities in the Pending Submission state must have complete details. You can update the opportunity while it's in the Pending Submission state.

There's a set of mandatory fields to create opportunities, but consider providing optional fields to enrich the opportunity record.

Method Signature

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTSCATALOGIDENTIFIER /AWS1/PTSCATALOGIDENTIFIER

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 created in. Use AWS to create opportunities in the Amazon Web Services catalog, and Sandbox for testing in secure, isolated environments.

iv_clienttoken TYPE /AWS1/PTSSTRING /AWS1/PTSSTRING

Required to be unique, and should be unchanging, it can be randomly generated or a meaningful string.

Default: None

Best practice: To help ensure uniqueness and avoid conflicts, use a Universally Unique Identifier (UUID) as the ClientToken. You can use standard libraries from most programming languages to generate this. If you use the same client token, the API returns the following error: "Conflicting client token submitted for a new request body."

Optional arguments:

it_primaryneedsfromaws TYPE /AWS1/CL_PTSPRIMARYNEEDSFRMA00=>TT_PRIMARYNEEDSFROMAWS TT_PRIMARYNEEDSFROMAWS

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

  • Cosell—Architectural Validation: Confirmation from Amazon Web Services that the partner's proposed solution architecture is aligned with Amazon Web Services best practices and poses minimal architectural risks.

  • Cosell—Business Presentation: Request Amazon Web Services seller's participation in a joint customer presentation.

  • Cosell—Competitive Information: Access to Amazon Web Services competitive resources and support for the partner's proposed solution.

  • Cosell—Pricing Assistance: Connect with an Amazon Web Services seller for support situations where a partner may be receiving an upfront discount on a service (for example: EDP deals).

  • Cosell—Technical Consultation: Connect with an Amazon Web Services Solutions Architect to address the partner's questions about the proposed solution.

  • Cosell—Total Cost of Ownership Evaluation: Assistance with quoting different cost savings of proposed solutions on Amazon Web Services versus on-premises or a traditional hosting environment.

  • Cosell—Deal Support: Request Amazon Web Services seller's support to progress the opportunity (for example: joint customer call, strategic positioning).

  • Cosell—Support for Public Tender/RFx: Opportunity related to the public sector where the partner needs Amazon Web Services RFx support.

iv_nationalsecurity TYPE /AWS1/PTSNATIONALSECURITY /AWS1/PTSNATIONALSECURITY

Indicates whether the Opportunity pertains to a national security project. This field must be set to true only when the customer's industry is Government. Additional privacy and security measures apply during the review and management process for opportunities marked as NationalSecurity.

iv_partneropportunityid TYPE /AWS1/PTSSTRING /AWS1/PTSSTRING

Specifies the opportunity's unique identifier in the partner's CRM system. This value is essential to track and reconcile because it's included in the outbound payload to the partner.

This field allows partners to link an opportunity to their CRM, which helps to ensure seamless integration and accurate synchronization between the Partner Central API and the partner's internal systems.

io_customer TYPE REF TO /AWS1/CL_PTSCUSTOMER /AWS1/CL_PTSCUSTOMER

Specifies customer details associated with the Opportunity.

io_project TYPE REF TO /AWS1/CL_PTSPROJECT /AWS1/CL_PTSPROJECT

An object that contains project details for the Opportunity.

iv_opportunitytype TYPE /AWS1/PTSOPPORTUNITYTYPE /AWS1/PTSOPPORTUNITYTYPE

Specifies the opportunity type as a renewal, new, or expansion.

Opportunity types:

  • New opportunity: Represents a new business opportunity with a potential customer that's not previously engaged with your solutions or services.

  • Renewal opportunity: Represents an opportunity to renew an existing contract or subscription with a current customer, ensuring continuity of service.

  • Expansion opportunity: Represents an opportunity to expand the scope of an existing contract or subscription, either by adding new services or increasing the volume of existing services for a current customer.

io_marketing TYPE REF TO /AWS1/CL_PTSMARKETING /AWS1/CL_PTSMARKETING

This object contains marketing details and is optional for an opportunity.

io_softwarerevenue TYPE REF TO /AWS1/CL_PTSSOFTWAREREVENUE /AWS1/CL_PTSSOFTWAREREVENUE

Specifies details of a customer's procurement terms. This is required only for partners in eligible programs.

io_lifecycle TYPE REF TO /AWS1/CL_PTSLIFECYCLE /AWS1/CL_PTSLIFECYCLE

An object that contains lifecycle details for the Opportunity.

iv_origin TYPE /AWS1/PTSOPPORTUNITYORIGIN /AWS1/PTSOPPORTUNITYORIGIN

Specifies the origin of the opportunity, indicating if it was sourced from Amazon Web Services or the partner. For all opportunities created with Catalog: AWS, this field must only be Partner Referral. However, when using Catalog: Sandbox, you can set this field to AWS Referral to simulate Amazon Web Services referral creation. This allows Amazon Web Services-originated flows testing in the sandbox catalog.

it_opportunityteam TYPE /AWS1/CL_PTSCONTACT=>TT_PTROPPORTUNITYTEAMMEMBERS00 TT_PTROPPORTUNITYTEAMMEMBERS00

Represents the internal team handling the opportunity. Specify collaborating members of this opportunity who are within the partner's organization.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptscreopportunityrsp /AWS1/CL_PTSCREOPPORTUNITYRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_pts~createopportunity(
  io_customer = new /aws1/cl_ptscustomer(
    io_account = new /aws1/cl_ptsaccount(
      io_address = new /aws1/cl_ptsaddress(
        iv_city = |string|
        iv_countrycode = |string|
        iv_postalcode = |string|
        iv_stateorregion = |string|
        iv_streetaddress = |string|
      )
      iv_awsaccountid = |string|
      iv_companyname = |string|
      iv_duns = |string|
      iv_industry = |string|
      iv_otherindustry = |string|
      iv_websiteurl = |string|
    )
    it_contacts = VALUE /aws1/cl_ptscontact=>tt_customercontactslist(
      (
        new /aws1/cl_ptscontact(
          iv_businesstitle = |string|
          iv_email = |string|
          iv_firstname = |string|
          iv_lastname = |string|
          iv_phone = |string|
        )
      )
    )
  )
  io_lifecycle = new /aws1/cl_ptslifecycle(
    it_nextstepshistory = VALUE /aws1/cl_ptsnextstepshistory=>tt_nextstepshistories(
      (
        new /aws1/cl_ptsnextstepshistory(
          iv_time = '20150101000000.0000000'
          iv_value = |string|
        )
      )
    )
    iv_closedlostreason = |string|
    iv_nextsteps = |string|
    iv_reviewcomments = |string|
    iv_reviewstatus = |string|
    iv_reviewstatusreason = |string|
    iv_stage = |string|
    iv_targetclosedate = |string|
  )
  io_marketing = new /aws1/cl_ptsmarketing(
    it_channels = VALUE /aws1/cl_ptschannels_w=>tt_channels(
      ( new /aws1/cl_ptschannels_w( |string| ) )
    )
    it_usecases = VALUE /aws1/cl_ptsusecases_w=>tt_usecases(
      ( new /aws1/cl_ptsusecases_w( |string| ) )
    )
    iv_awsfundingused = |string|
    iv_campaignname = |string|
    iv_source = |string|
  )
  io_project = new /aws1/cl_ptsproject(
    it_apnprograms = VALUE /aws1/cl_ptsapnprograms_w=>tt_apnprograms(
      ( new /aws1/cl_ptsapnprograms_w( |string| ) )
    )
    it_deliverymodels = VALUE /aws1/cl_ptsdeliverymodels_w=>tt_deliverymodels(
      ( new /aws1/cl_ptsdeliverymodels_w( |string| ) )
    )
    it_expectedcustomerspend = VALUE /aws1/cl_ptsexpectedcusspend=>tt_expectedcustomerspendlist(
      (
        new /aws1/cl_ptsexpectedcusspend(
          iv_amount = |string|
          iv_currencycode = |string|
          iv_estimationurl = |string|
          iv_frequency = |string|
          iv_targetcompany = |string|
        )
      )
    )
    it_salesactivities = VALUE /aws1/cl_ptssalesactivities_w=>tt_salesactivities(
      ( new /aws1/cl_ptssalesactivities_w( |string| ) )
    )
    iv_additionalcomments = |string|
    iv_competitorname = |string|
    iv_customerbusinessproblem = |string|
    iv_customerusecase = |string|
    iv_othercompetitornames = |string|
    iv_othersolutiondescription = |string|
    iv_relatedopportunityid = |string|
    iv_title = |string|
  )
  io_softwarerevenue = new /aws1/cl_ptssoftwarerevenue(
    io_value = new /aws1/cl_ptsmonetaryvalue(
      iv_amount = |string|
      iv_currencycode = |string|
    )
    iv_deliverymodel = |string|
    iv_effectivedate = |string|
    iv_expirationdate = |string|
  )
  it_opportunityteam = VALUE /aws1/cl_ptscontact=>tt_ptropportunityteammembers00(
    (
      new /aws1/cl_ptscontact(
        iv_businesstitle = |string|
        iv_email = |string|
        iv_firstname = |string|
        iv_lastname = |string|
        iv_phone = |string|
      )
    )
  )
  it_primaryneedsfromaws = VALUE /aws1/cl_ptsprimaryneedsfrma00=>tt_primaryneedsfromaws(
    ( new /aws1/cl_ptsprimaryneedsfrma00( |string| ) )
  )
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_nationalsecurity = |string|
  iv_opportunitytype = |string|
  iv_origin = |string|
  iv_partneropportunityid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_opportunityidentifier = lo_result->get_id( ).
  lv_string = lo_result->get_partneropportunityid( ).
  lv_datetime = lo_result->get_lastmodifieddate( ).
ENDIF.