This API clones all the attachments and files associated with the source email template and associate them with the newly cloned email template. This API is a callback API of cloneEmailTemplate API.

APISignature
afterEmailTemplateClonewebService static Boolean afterEmailTemplateClone(Id originalId, Id cloneId)



Request Parameter
NameTypeDescription
originalIdIDThe ID of email template you want to clone.
cloneIdIDThe ID of the cloned proposal where you want to clone the attachments or files.



Response Parameter
FieldTypeDescription
isSuccessBooleanIndicates whether the cloning pf the document template was successful. The values are true and false.


Code Sample

The sample code below allows you to clone an email template and attachments or files from the parent email template and associate to the newly cloned email template.


/**
 * The below code clone email template and the callback function of cloning the document template from the source 
 * and associate with the cloned email template. It returns boolean based on the status of after clone action.
 */
public Boolean AfterCloneEmailTemplate(Id  SrourceID) {
   Boolean afterCloneAPIStatus = false;
   Id clonedId = Apttus_Proposal.ProposalWebService.cloneEmailTemplate(SrourceID);
   afterCloneAPIStatus = Apttus_Proposal.ProposalWebService.afterEmailTemplateClone(SrourceID, clonedId);
   return afterCloneAPIStatus;
}
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:afterEmailTemplateClone>
            <prop:originalId>a09i000000TGec8</prop:originalId>
            <prop:cloneId>a09Z000000E2y3l</prop:cloneId>
        </prop:afterEmailTemplateClone>
    </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>
        <afterEmailTemplateCloneResponse>
            <result>true</result>
        </afterEmailTemplateCloneResponse>
    </soapenv:Body>
</soapenv:Envelope>
XML