This API creates proposal line items from opportunity line items, creates a task for the action and invokes custom the callback which extends the interface CustomClass.IQuoteLifecycleCallback2. This API is a callback action after the proposal is created from createProposalFromOpportunity API.

APISignature
afterCreateFromOpportunitywebService static Boolean afterCreateFromOpportunity(Id proposalId)



Request Parameter
NameTypeDescription
proposalIdIDThe ID of the existing proposal.
Response Parameters

FieldTypeDescription
isSuccessBooleanIndicates whether the callback was successfully executed. The values are true and false.


Code Sample

The sample code below enables you to create proposal line items from the opportunity and create a new task for given proposalID.


/**
 * The below code creates proposal line  items from opportunity and create task for the proposal as callback actions. 
 * proposal from createProposalFromOpportunity API.
 */
public Boolean afterCreateFromOpportunity(String proposalName) {
    Boolean callBackStatus = false;
    Apttus_Proposal__Proposal__c proposalSO = [SELECT Id 
               FROM Apttus_Proposal__Proposal__c 
               WHERE Name =: proposalName LIMIT 1];
    callBackStatus  = Apttus_Proposal.ProposalWebService.afterCreateFromOpportunity(proposalSO.Id);
    return callBackStatus;
}
CODE

Integration Details

Use the following information in your integrations with CPQ Web Services API. Refer to Integrating Conga with External Systems for information on how to get started.

API Prerequisites

Response/Request XML

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
	xmlns:prop="http://soap.sforce.com/schemas/class/Apttus_Proposal/ProposalWebService">
   <soapenv:Header>
      <prop:SessionHeader>
         <prop:sessionId>00DZ000000NAEIA!ASAAQKosATSpsGeD7FUh4RDI18xnzIFPe80Mk89ejrAmDrCBY2lmyJKQjKvuwj3TvT71r6g_epvbo6FeqKUPfmSookHTttOu</prop:sessionId>
      </prop:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <prop:afterCreateFromOpportunity>
         <prop:proposalId>a0eZ0000005pF3U</prop:proposalId>
      </prop:afterCreateFromOpportunity>
   </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/schemas/class/Apttus_Proposal/ProposalWebService">
    <soapenv:Body>
        <afterCreateFromOpportunityResponse>
            <result>true</result>
        </afterCreateFromOpportunityResponse>
    </soapenv:Body>
</soapenv:Envelope>
XML