/AWS1/CL_PTS=>LISTOPPORTUNITIES()
¶
About ListOpportunities¶
This request accepts a list of filters that retrieve opportunity subsets as well as sort options. This feature is available to partners from Partner Central using the ListOpportunities
API action.
To synchronize your system with Amazon Web Services, only list the opportunities that were newly created or updated. We recommend you rely on events emitted by the service into your Amazon Web Services account’s Amazon EventBridge default event bus, you can also use the ListOpportunities
action.
We recommend the following approach:
-
Find the latest
LastModifiedDate
that you stored, and only use the values that came from Amazon Web Services. Don’t use values generated by your system. -
When you send a
ListOpportunities
request, submit the date in ISO 8601 format in theAfterLastModifiedDate
filter. -
Amazon Web Services only returns opportunities created or updated on or after that date and time. Use
NextToken
to iterate over all pages.
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
orSandbox
. The catalog determines which environment the opportunities are listed in. UseAWS
for listing real opportunities in the Amazon Web Services catalog, andSandbox
for testing in secure, isolated environments.
Optional arguments:¶
iv_maxresults
TYPE /AWS1/PTSPAGESIZE
/AWS1/PTSPAGESIZE
¶
Specifies the maximum number of results to return in a single call. This limits the number of opportunities returned in the response to avoid providing too many results at once.
Default: 20
iv_nexttoken
TYPE /AWS1/PTSSTRING
/AWS1/PTSSTRING
¶
A pagination token used to retrieve the next set of results in subsequent calls. This token is included in the response only if there are additional result pages available.
io_sort
TYPE REF TO /AWS1/CL_PTSOPPORTUNITYSORT
/AWS1/CL_PTSOPPORTUNITYSORT
¶
An object that specifies how the response is sorted. The default
Sort.SortBy
value isLastModifiedDate
.
io_lastmodifieddate
TYPE REF TO /AWS1/CL_PTSLASTMODIFIEDDATE
/AWS1/CL_PTSLASTMODIFIEDDATE
¶
Filters the opportunities based on their last modified date. This filter helps retrieve opportunities that were updated after the specified date, allowing partners to track recent changes or updates.
it_identifier
TYPE /AWS1/CL_PTSFILTERIDENTIFIER_W=>TT_FILTERIDENTIFIER
TT_FILTERIDENTIFIER
¶
Filters the opportunities based on the opportunity identifier. This allows partners to retrieve specific opportunities by providing their unique identifiers, ensuring precise results.
it_lifecyclestage
TYPE /AWS1/CL_PTSFILTERLCSTAGE_W=>TT_FILTERLIFECYCLESTAGE
TT_FILTERLIFECYCLESTAGE
¶
Filters the opportunities based on their lifecycle stage. This filter allows partners to retrieve opportunities at various stages in the sales cycle, such as
Qualified
,Technical Validation
,Business Validation
, orClosed Won
.
it_lifecyclereviewstatus
TYPE /AWS1/CL_PTSFILTLCREVIEWSTAT_W=>TT_FILTERLIFECYCLEREVIEWSTATUS
TT_FILTERLIFECYCLEREVIEWSTATUS
¶
Filters the opportunities based on their current lifecycle approval status. Use this filter to retrieve opportunities with statuses such as
Pending Submission
,In Review
,Action Required
, orApproved
.
it_customercompanyname
TYPE /AWS1/CL_PTSSTRINGLIST_W=>TT_STRINGLIST
TT_STRINGLIST
¶
Filters the opportunities based on the customer's company name. This allows partners to search for opportunities associated with a specific customer by matching the provided company name string.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_ptslstopportunities01
/AWS1/CL_PTSLSTOPPORTUNITIES01
¶
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~listopportunities(
io_lastmodifieddate = new /aws1/cl_ptslastmodifieddate(
iv_afterlastmodifieddate = '20150101000000.0000000'
iv_beforelastmodifieddate = '20150101000000.0000000'
)
io_sort = new /aws1/cl_ptsopportunitysort(
iv_sortby = |string|
iv_sortorder = |string|
)
it_customercompanyname = VALUE /aws1/cl_ptsstringlist_w=>tt_stringlist(
( new /aws1/cl_ptsstringlist_w( |string| ) )
)
it_identifier = VALUE /aws1/cl_ptsfilteridentifier_w=>tt_filteridentifier(
( new /aws1/cl_ptsfilteridentifier_w( |string| ) )
)
it_lifecyclereviewstatus = VALUE /aws1/cl_ptsfiltlcreviewstat_w=>tt_filterlifecyclereviewstatus(
( new /aws1/cl_ptsfiltlcreviewstat_w( |string| ) )
)
it_lifecyclestage = VALUE /aws1/cl_ptsfilterlcstage_w=>tt_filterlifecyclestage(
( new /aws1/cl_ptsfilterlcstage_w( |string| ) )
)
iv_catalog = |string|
iv_maxresults = 123
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_opportunitysummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_catalogidentifier = lo_row_1->get_catalog( ).
lv_opportunityidentifier = lo_row_1->get_id( ).
lv_opportunityarn = lo_row_1->get_arn( ).
lv_string = lo_row_1->get_partneropportunityid( ).
lv_opportunitytype = lo_row_1->get_opportunitytype( ).
lv_datetime = lo_row_1->get_lastmodifieddate( ).
lv_datetime = lo_row_1->get_createddate( ).
lo_lifecyclesummary = lo_row_1->get_lifecycle( ).
IF lo_lifecyclesummary IS NOT INITIAL.
lv_stage = lo_lifecyclesummary->get_stage( ).
lv_closedlostreason = lo_lifecyclesummary->get_closedlostreason( ).
lv_piistring = lo_lifecyclesummary->get_nextsteps( ).
lv_date = lo_lifecyclesummary->get_targetclosedate( ).
lv_reviewstatus = lo_lifecyclesummary->get_reviewstatus( ).
lv_string = lo_lifecyclesummary->get_reviewcomments( ).
lv_string = lo_lifecyclesummary->get_reviewstatusreason( ).
ENDIF.
lo_customersummary = lo_row_1->get_customer( ).
IF lo_customersummary IS NOT INITIAL.
lo_accountsummary = lo_customersummary->get_account( ).
IF lo_accountsummary IS NOT INITIAL.
lv_industry = lo_accountsummary->get_industry( ).
lv_string = lo_accountsummary->get_otherindustry( ).
lv_name = lo_accountsummary->get_companyname( ).
lv_websiteurl = lo_accountsummary->get_websiteurl( ).
lo_addresssummary = lo_accountsummary->get_address( ).
IF lo_addresssummary IS NOT INITIAL.
lv_addresspart = lo_addresssummary->get_city( ).
lv_addresspart = lo_addresssummary->get_postalcode( ).
lv_addresspart = lo_addresssummary->get_stateorregion( ).
lv_countrycode = lo_addresssummary->get_countrycode( ).
ENDIF.
ENDIF.
ENDIF.
lo_projectsummary = lo_row_1->get_project( ).
IF lo_projectsummary IS NOT INITIAL.
LOOP AT lo_projectsummary->get_deliverymodels( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_deliverymodel = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_projectsummary->get_expectedcustomerspend( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_amount( ).
lv_currencycode = lo_row_5->get_currencycode( ).
lv_paymentfrequency = lo_row_5->get_frequency( ).
lv_string = lo_row_5->get_targetcompany( ).
lv_websiteurl = lo_row_5->get_estimationurl( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.