This API fetches the field values of the proposal object that are required to clone from an existing proposal. You can use the fetched values to clone the proposal. 

APISignature
cloneProposalwebService static Apttus_Proposal__Proposal__c cloneProposal(Id originalId)



Request Parameter
NameTypeDescription
proposalIdsIDThe ID of the proposal you want to clone.



Response  - Apttus_Proposal__Proposal__c
FieldTypeDescription
RecordTypeIdIDRecord Type of the proposal object
Apttus_Proposal__Proposal_Name__cStringThe name of the proposal.
Apttus_Proposal__Account__cIDThe Id of the account associated with the proposal.
Apttus_Proposal__Primary_Contact__cIDThe primary contact associated with the proposal.
Apttus_Proposal__Description__cStringThe description of the proposal.
Apttus_Proposal__Primary__cBooleanIndicates whether the proposal is the primary quote to update the related opportunity.
Apttus_Proposal__ReadyToGenerate__cBooleanIndicates whether the proposal is ready for generation.
Apttus_Proposal__ReadyToPresent__cBooleanIndicates whether the proposal is ready for presentation.
OwnerIdIDThe ID of the proposal object.
CurrencyIsoCodeStringThe currency defined for the proposal.


Code Sample

The sample code below enables you to retrieve the proposal field values from the proposal associated with the ID that you provide. You can use the standard createRecord API to create the new proposal.


/**
 * The below code demonstrates how to fetch the fields values from an existing proposal
 */
Apttus_Proposal__Proposal__c proposalSO = new Apttus_Proposal__Proposal__c();
proposalSO =  Apttus_Proposal.ProposalWebService.cloneProposal(proposalID);
System.debug(proposalSO);
CODE

Integration Details

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

API Prerequisites

None.

Response/Request XML

Example Request (click to expand)

<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:cloneProposal>
            <prop:originalId>a0eZ0000005pF3U</prop:originalId>
        </prop:cloneProposal>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response (click to expand)

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/schemas/class/Apttus_Proposal/ProposalWebService"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <cloneProposalResponse>
            <result xsi:type="Apttus_Proposal__Proposal__c">
                <Id xsi:nil="true"/>
                <ABOTerminate__c>_HL_ENCODED_/apex/Apttus_QPConfig__ProposalConfiguration?id=a0eZ0000005pF3U&flow=ABOTerminate_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</ABOTerminate__c>
                <Apttus_Proposal__Account__c>001Z000001UeYiiIAF</Apttus_Proposal__Account__c>
                <Apttus_Proposal__Amount__c>0.00</Apttus_Proposal__Amount__c>
                <Apttus_Proposal__Approval_Stage__c>Draft</Apttus_Proposal__Approval_Stage__c>
                <Apttus_Proposal__Generate__c>_HL_ENCODED_/apex/Apttus_Proposal__ProposalGenerate?id=a0eZ0000005pF3U_HL__IM1_/resource/Apttus_Proposal__Button_Generate_IM2_Generate_IM3__HL__self_HL_</Apttus_Proposal__Generate__c>
                <Apttus_Proposal__Grand_Total__c>0.00</Apttus_Proposal__Grand_Total__c>
                <Apttus_Proposal__MakePrimary__c>_HL_ENCODED_/apex/Apttus_Proposal__ProposalMakePrimary?id=a0eZ0000005pF3U_HL__IM1_/resource/Apttus_Proposal__Button_MakePrimary_IM2_Make Primary_IM3__HL__self_HL_</Apttus_Proposal__MakePrimary__c>
                <Apttus_Proposal__Net_Amount__c>0.00</Apttus_Proposal__Net_Amount__c>
                <Apttus_Proposal__Opportunity__c>006Z000000Gr9ODIAZ</Apttus_Proposal__Opportunity__c>
                <Apttus_Proposal__Payment_Term__c>Net 30 Days</Apttus_Proposal__Payment_Term__c>
                <Apttus_Proposal__Present__c>_HL_ENCODED_/apex/Apttus_Proposal__ProposalPresent?id=a0eZ0000005pF3U_HL__IM1_/resource/Apttus_Proposal__Button_Present_IM2_Present_IM3__HL__self_HL_</Apttus_Proposal__Present__c>
                <Apttus_Proposal__Preview__c>_HL_ENCODED_/apex/Apttus_Proposal__ProposalGenerate?id=a0eZ0000005pF3U&action=Preview_HL__IM1_/resource/Apttus_Proposal__Button_Preview_IM2_Preview_IM3__HL__self_HL_</Apttus_Proposal__Preview__c>
                <Apttus_Proposal__Primary__c>false</Apttus_Proposal__Primary__c>
                <Apttus_Proposal__Proposal_Name__c>Test_CR003</Apttus_Proposal__Proposal_Name__c>
                <Apttus_Proposal__ReadyToGenerate__c>true</Apttus_Proposal__ReadyToGenerate__c>
                <Apttus_Proposal__ReadyToPresent__c>true</Apttus_Proposal__ReadyToPresent__c>
                <Apttus_Proposal__Request_Approval__c>_HL_ENCODED_/servlet/servlet.Integration?lid=01N700000009u2c&eid=a0eZ0000005pF3U_HL__IM1_/servlet/servlet.ImageServer?oid=00D70000000JXTN&id=01570000000e6nU_IM2_Submit_IM3__HL__blank_HL_</Apttus_Proposal__Request_Approval__c>
                <Apttus_Proposal__Sales_Tax_Amount__c>0.00</Apttus_Proposal__Sales_Tax_Amount__c>
                <Apttus_Proposal__SendProposal__c>_HL_ENCODED_/apex/Apttus_Proposal__DocGen?id=a0eZ0000005pF3U&context=proposal&name=Q-01308003_HL__IM1_/resource/Apttus_Proposal__Button_SendProposal_IM2_Send Proposal_IM3__HL__self_HL_</Apttus_Proposal__SendProposal__c>
                <Apttus_QPAsset__ConfigureWithAssets__c>_HL_ENCODED_/apex/Apttus_QPAsset__ProposalConfiguration?id=a0eZ0000005pF3U_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</Apttus_QPAsset__ConfigureWithAssets__c>
                <Apttus_QPConfig__AutoActivateOrder__c>false</Apttus_QPConfig__AutoActivateOrder__c>
                <Apttus_QPConfig__AutoCreateBill__c>false</Apttus_QPConfig__AutoCreateBill__c>
                <Apttus_QPConfig__AutoCreateRevenue__c>false</Apttus_QPConfig__AutoCreateRevenue__c>
                <Apttus_QPConfig__BillingPreferenceId__c>a2ti0000000Fh9SAAS</Apttus_QPConfig__BillingPreferenceId__c>
                <Apttus_QPConfig__ConfigureNG__c>_HL_ENCODED_/apex/Apttus_QPConfig__ProposalConfiguration?id=a0eZ0000005pF3U&flow=NGDefault_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</Apttus_QPConfig__ConfigureNG__c>
                <Apttus_QPConfig__Configure__c>_HL_ENCODED_/apex/Apttus_QPConfig__ProposalConfiguration?id=a0eZ0000005pF3U&flow=Default_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</Apttus_QPConfig__Configure__c>
                <Apttus_QPConfig__DisableCartVersioning__c>false</Apttus_QPConfig__DisableCartVersioning__c>
                <Apttus_QPConfig__IsAutoAccepted__c>false</Apttus_QPConfig__IsAutoAccepted__c>
                <Apttus_QPConfig__IsSystemGenerated__c>false</Apttus_QPConfig__IsSystemGenerated__c>
                <Apttus_QPConfig__IsTaskPending__c>false</Apttus_QPConfig__IsTaskPending__c>
                <Apttus_QPConfig__PriceListId__c>a1De0000001yPXQEA2</Apttus_QPConfig__PriceListId__c>
                <Apttus_QPConfig__SourceChannel__c>Direct</Apttus_QPConfig__SourceChannel__c>
                <Apttus_QPConfig__SyncAssetChangesToQuote__c>true</Apttus_QPConfig__SyncAssetChangesToQuote__c>
                <Apttus_QPConfig__UseType__c>Main</Apttus_QPConfig__UseType__c>
                <AsyncFinalize_CartGrid__c>_HL_ENCODED_/apex/Apttus_QPConfig__ProposalConfiguration?id=a0eZ0000005pF3U&flow=AutoCartGrid&asyncFinalize=true_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</AsyncFinalize_CartGrid__c>
                <AutoCartGrid__c>_HL_ENCODED_/apex/Apttus_QPConfig__ProposalConfiguration?id=a0eZ0000005pF3U&flow=AutoCartGrid_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</AutoCartGrid__c>
                <AutoCartReadOnly__c>_HL_ENCODED_/apex/Apttus_QPConfig__ProposalConfiguration?id=a0eZ0000005pF3U&flow=AutoCartGrid&mode=readOnly_HL__IM1_/resource/Apttus_QPConfig__Button_Configure_IM2_Configure Products_IM3__HL__self_HL_</AutoCartReadOnly__c>
                <CurrencyIsoCode>USD</CurrencyIsoCode>
                <IsDeleted>false</IsDeleted>
                <Net_Amount__c>0.00</Net_Amount__c>
                <Numeric_Range_Field__c>1</Numeric_Range_Field__c>
                <OwnerId>0050U000000r444QAA</OwnerId>
                <Quote_Checkbox_21145__c>false</Quote_Checkbox_21145__c>
                <RecordTypeId>012i00000001ECbAAM</RecordTypeId>
                <Region__c>India</Region__c>
                <SystemModstamp>2020-05-20T19:52:43.000Z</SystemModstamp>
            </result>
        </cloneProposalResponse>
    </soapenv:Body>
</soapenv:Envelope>
XML

Creating a Proposal

Use data from the Response to create the proposal. The following uses the createRecord() method to create the Proposal object.

Example Request (click to expand)

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:urn="urn:partner.soap.sforce.com"
    xmlns:urn1="urn:sobject.partner.soap.sforce.com">
    <soapenv:Header>
        <urn:SessionHeader>
            <urn:sessionId>00DZ000000NAEIA!ASAAQKosATSpsGeD7FUh4RDI18xnzIFPe80Mk89ejrAmDrCBY2lmyJKQjKvuwj3TvT71r6g_epvbo6FeqKUPfmSookHTttOu</urn:sessionId>
        </urn:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <urn:create>
            <urn:sObjects>
                <urn1:type>Apttus_Proposal__Proposal__c</urn1:type>
                <urn1:Apttus_Proposal__Account__c>001Z000001UeYiiIAF</urn1:Apttus_Proposal__Account__c>
                <urn1:Apttus_Proposal__Approval_Stage__c>Draft</urn1:Apttus_Proposal__Approval_Stage__c>
                <urn1:Apttus_Proposal__Opportunity__c>006Z000000Gr9ODIAZ</urn1:Apttus_Proposal__Opportunity__c>
                <urn1:Apttus_Proposal__Payment_Term__c>Net 30 Days</urn1:Apttus_Proposal__Payment_Term__c>
                <urn1:Apttus_Proposal__Primary__c>false</urn1:Apttus_Proposal__Primary__c>
                <urn1:Apttus_Proposal__Proposal_Name__c>Test_CR003-copy2</urn1:Apttus_Proposal__Proposal_Name__c>
                <urn1:Apttus_Proposal__ReadyToGenerate__c>true</urn1:Apttus_Proposal__ReadyToGenerate__c>
                <urn1:Apttus_Proposal__ReadyToPresent__c>true</urn1:Apttus_Proposal__ReadyToPresent__c>
                <urn1:Apttus_QPConfig__AutoActivateOrder__c>false</urn1:Apttus_QPConfig__AutoActivateOrder__c>
                <urn1:Apttus_QPConfig__AutoCreateBill__c>false</urn1:Apttus_QPConfig__AutoCreateBill__c>
                <urn1:Apttus_QPConfig__AutoCreateRevenue__c>false</urn1:Apttus_QPConfig__AutoCreateRevenue__c>
                <urn1:Apttus_QPConfig__BillingPreferenceId__c>a2ti0000000Fh9SAAS</urn1:Apttus_QPConfig__BillingPreferenceId__c>
                <urn1:Apttus_QPConfig__DisableCartVersioning__c>false</urn1:Apttus_QPConfig__DisableCartVersioning__c>
                <urn1:Apttus_QPConfig__IsAutoAccepted__c>false</urn1:Apttus_QPConfig__IsAutoAccepted__c>
                <urn1:Apttus_QPConfig__IsSystemGenerated__c>false</urn1:Apttus_QPConfig__IsSystemGenerated__c>
                <urn1:Apttus_QPConfig__IsTaskPending__c>false</urn1:Apttus_QPConfig__IsTaskPending__c>
                <urn1:Apttus_QPConfig__PriceListId__c>a1De0000001yPXQEA2</urn1:Apttus_QPConfig__PriceListId__c>
                <urn1:Apttus_QPConfig__SourceChannel__c>Direct</urn1:Apttus_QPConfig__SourceChannel__c>
                <urn1:Apttus_QPConfig__SyncAssetChangesToQuote__c>true</urn1:Apttus_QPConfig__SyncAssetChangesToQuote__c>
                <urn1:Apttus_QPConfig__UseType__c>Main</urn1:Apttus_QPConfig__UseType__c>
                <urn1:CurrencyIsoCode>USD</urn1:CurrencyIsoCode>
                <urn1:Numeric_Range_Field__c>1</urn1:Numeric_Range_Field__c>
                <urn1:OwnerId>0050U000000r444QAA</urn1:OwnerId>
                <urn1:Quote_Checkbox_21145__c>false</urn1:Quote_Checkbox_21145__c>
                <urn1:RecordTypeId>012i00000001ECbAAM</urn1:RecordTypeId>
                <urn1:Region__c>India</urn1:Region__c>
            </urn:sObjects>
        </urn:create>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response (click to expand)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com">
   <soapenv:Header>
   </soapenv:Header>
   <soapenv:Body>
      <createResponse>
         <result>
            <id>a0eZ0000005pFF1IAM</id>
            <success>true</success>
         </result>
      </createResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML