Knowledge Center

Knowledge Center > Commerce > Zuora Connector for Salesforce CPQ > Global Methods in Zuora Connector for Salesforce CPQ

Global Methods in Zuora Connector for Salesforce CPQ

Table of contents

The ZSBConnectorUtils class contains the following global methods for creating contracts in Salesforce CPQ.

Method Return Type Description
createContractFromOpportunity
(Id opportunityId)
void

Converts the primary quote to a contract for an opportunity. 

If the Billing Account does not exist in Zuora, this method will create the Billing Account in Zuora.

createContractFromQuote
(Id quoteId)
void

Converts a quote to a contact.

If the Billing Account does not exist in Zuora, this method will create the Billing Account in Zuora.

Send Contract to Zuora

To programmatically send a contract to Zuora, set the Send to Zuora (ZSB__SubscribeToZuora__c) field on the Contract object to true as shown in the code sample below.

A contract is sent to Zuora asynchronously. When the response comes back from Zuora, the Zuora Sync Status (ZSB__ZuoraSyncStatus__c) field on the Contract object will be populated with the results.

Contract c = [select Id FROM Contract Where Id='8003600000086iM' LIMIT 1];
c.SubscribeToZuora__c = true;
update c;
Last modified
11:33, 5 Apr 2017

Tags

This page has no custom tags.

Classifications

(not set)