Skip to content

/AWS1/IF_PTS=>CREATEENGAGEMENTCONTEXT()

About CreateEngagementContext

Creates a new context within an existing engagement. This action allows you to add contextual information such as customer projects or documents to an engagement, providing additional details that help facilitate collaboration between engagement members.

Method Signature

METHODS /AWS1/IF_PTS~CREATEENGAGEMENTCONTEXT
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTSCATALOGIDENTIFIER OPTIONAL
    !IV_ENGAGEMENTIDENTIFIER TYPE /AWS1/PTSENGAGEMENTARNORID OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/PTSCLIENTTOKEN OPTIONAL
    !IV_TYPE TYPE /AWS1/PTSENGAGEMENTCONTEXTTYPE OPTIONAL
    !IO_PAYLOAD TYPE REF TO /AWS1/CL_PTSENGAGEMENTCTXPAY00 OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptscreengagementctx01
  RAISING
    /AWS1/CX_PTSACCESSDENIEDEX
    /AWS1/CX_PTSCONFLICTEXCEPTION
    /AWS1/CX_PTSINTERNALSERVEREX
    /AWS1/CX_PTSRESOURCENOTFOUNDEX
    /AWS1/CX_PTSSERVICEQUOTAEXCDEX
    /AWS1/CX_PTSTHROTTLINGEX
    /AWS1/CX_PTSVALIDATIONEX
    /AWS1/CX_PTSCLIENTEXC
    /AWS1/CX_PTSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTSCATALOGIDENTIFIER /AWS1/PTSCATALOGIDENTIFIER

Specifies the catalog associated with the engagement context request. This field takes a string value from a predefined list: AWS or Sandbox. The catalog determines which environment the engagement context is created in. Use AWS to create contexts in the production environment, and Sandbox for testing in secure, isolated environments.

iv_engagementidentifier TYPE /AWS1/PTSENGAGEMENTARNORID /AWS1/PTSENGAGEMENTARNORID

The unique identifier of the Engagement for which the context is being created. This parameter ensures the context is associated with the correct engagement and provides the necessary linkage between the engagement and its contextual information.

iv_clienttoken TYPE /AWS1/PTSCLIENTTOKEN /AWS1/PTSCLIENTTOKEN

A unique, case-sensitive identifier provided by the client to ensure that the request is handled exactly once. This token helps prevent duplicate context creations and must not exceed sixty-four alphanumeric characters. Use a UUID or other unique string to ensure idempotency.

iv_type TYPE /AWS1/PTSENGAGEMENTCONTEXTTYPE /AWS1/PTSENGAGEMENTCONTEXTTYPE

Specifies the type of context being created for the engagement. This field determines the structure and content of the context payload. Valid values include CustomerProject for customer project-related contexts. The type field ensures that the context is properly categorized and processed according to its intended purpose.

io_payload TYPE REF TO /AWS1/CL_PTSENGAGEMENTCTXPAY00 /AWS1/CL_PTSENGAGEMENTCTXPAY00

Represents the payload of an Engagement context. The structure of this payload varies based on the context type specified in the EngagementContextDetails.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptscreengagementctx01 /AWS1/CL_PTSCREENGAGEMENTCTX01

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->createengagementcontext(
  io_payload = new /aws1/cl_ptsengagementctxpay00(
    io_customerproject = new /aws1/cl_ptscusprojectscontext(
      io_customer = new /aws1/cl_ptsengagementcustomer(
        iv_companyname = |string|
        iv_countrycode = |string|
        iv_industry = |string|
        iv_websiteurl = |string|
      )
      io_project = new /aws1/cl_ptsengagementcuspro00(
        iv_businessproblem = |string|
        iv_targetcompletiondate = |string|
        iv_title = |string|
      )
    )
    io_lead = new /aws1/cl_ptsleadcontext(
      io_customer = new /aws1/cl_ptsleadcustomer(
        io_address = new /aws1/cl_ptsaddresssummary(
          iv_city = |string|
          iv_countrycode = |string|
          iv_postalcode = |string|
          iv_stateorregion = |string|
        )
        iv_awsmaturity = |string|
        iv_companyname = |string|
        iv_industry = |string|
        iv_marketsegment = |string|
        iv_websiteurl = |string|
      )
      it_interactions = VALUE /aws1/cl_ptsleadinteraction=>tt_leadinteractionlist(
        (
          new /aws1/cl_ptsleadinteraction(
            io_contact = new /aws1/cl_ptsleadcontact(
              iv_businesstitle = |string|
              iv_email = |string|
              iv_firstname = |string|
              iv_lastname = |string|
              iv_phone = |string|
            )
            iv_businessproblem = |string|
            iv_customeraction = |string|
            iv_interactiondate = '20150101000000.0000000'
            iv_sourceid = |string|
            iv_sourcename = |string|
            iv_sourcetype = |string|
            iv_usecase = |string|
          )
        )
      )
      iv_qualificationstatus = |string|
    )
  )
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_engagementidentifier = |string|
  iv_type = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_engagementidentifier = lo_result->get_engagementid( ).
  lv_engagementarn = lo_result->get_engagementarn( ).
  lv_datetime = lo_result->get_engagementlastmodifiedat( ).
  lv_engagementcontextidenti = lo_result->get_contextid( ).
ENDIF.