Enable and use Flexible Billing Attributes in CPQ X
Overview 
With the Flexible Billing Attributes feature enabled, you can specify billing attributes, including bill-to-contacts and payment terms at the subscription level.
If one account has subscriptions with different payment terms and bill-to contacts, you no longer have to duplicate accounts for different payment terms, sold-to contacts, and bill-to contacts. Flexible Billing Attributes allows you to specify bill-to-contacts and payment terms during subscription creation.
If you enable the Flexible Billing Attributes feature, you will need to provide the API Client Id and API Client Secret under Zuora Config > Zuora Connection Settings.
See Generate authentication credentials to generate API Client Id and API Client Secret.
Prerequisites 
- Ensure that you have installed or upgraded the Zuora 360 version to 5.16 or greater.
- Ensure that you have enabled Contact Sync through Zuora 360.
- Ensure that you have enabled the Flexible Billing Attributes feature in the connected Zuora tenant.
- Check the known restrictions and limitations of the Flexible Billing Attributes feature.
Enablement 
To enable the Flexible Billing Attributes feature in CPQ X, perform the following steps:
- In your Salesforce org, navigate to Zuora Config > Quote Studio Settings > Admin Config.
- Switch on the toggle Enable Flexible Billing in Quote Studio.
- Click Save.
Note that the system will allow you to enable Flexible Billing only if the Flexible Billing Attributes feature is enabled in the connected Zuora tenant. Otherwise, you will receive an error stating Your Zuora Tenant is not enabled Flexible Billing. Please reach out to Zuora Support to avail “Flexible Billing” feature
.
Billing attributes for this feature 
After the Flexible Billing Attributes feature is enabled, you will see a new section called SUBSCRIPTION BILLING ATTRIBUTES in Quote Studio. This section is applicable for new quotes with existing billing accounts, amendment quotes, and renewal quotes. As an admin, you can control the below SUBSCRIPTION BILLING ATTRIBUTES fields using the "zqu__CPQX_Subscription_Billing_Attributes" fieldset.
Field | Description |
---|---|
Subscription Bill To Contact | The bill-to-contact ID associated with a subscription. For example, you can specify Steve Lee as the bill-to-contact of the invoice owner for a subscription instead of using the default bill-to-contact of the account. If the invoice owner is not present, all associated contacts of your chosen billing account will be displayed, and if the invoice owner is selected, the Subscription Bill To Contact field will display all associated contacts of your chosen invoice owner account. |
Subscription Sold To Contact | The sold-to-contact ID associated with a subscription. For example, you can specify Steve Lee as the sold-to-contact of the invoice owner for a subscription instead of using the default sold-to-contact of the account. If the invoice owner is not present, all associated contacts of your chosen billing account will be displayed, and if the invoice owner is selected, the Subscription Sold To Contact field will display all associated contacts of your chosen invoice owner account |
Subscription Payment Term |
The name of the payment term is associated with a subscription. For example, Net 30, which indicates that payment is due 30 days from the invoice date. The payment term determines the due dates of invoices. It displays all the picklist values defined at the zqu__Subscription_Payment_Term__c field on the Quote object. |
Subscription Invoice Template | Specify the invoice template associated with the subscription. |
Subscription Sequence Set | Specify the sequence set associated with the subscription. |
Display contact address in Subscription Bill To Contact and Subscription Sold To Contact fields
You can configure the Subscription Bill To Contact and Subscription Sold To Contact fields to display Contact Address with Account Name as picklist values.
To display the contact address in subscription level Bill To Contact and Sold To Contact fields, take the following steps:
- In your Salesforce org, navigate to Zuora Config > Quote Studio Settings > Admin Config.
- Switch on the toggle Display Contact Address fields in Subscription Level Contact picklists. This setting must be used in conjunction with Enable Flexible Billing in Quote Studio setting.
- Click Save.
Restrict access to Flexible Billing Attributes 
You can restrict access to Flexible Billing Attributes for specific user profiles.
See Restrict access to features in Quote Studio for more information.
Default Subscription Bill to Contact and Subscription Payment Term with Default Values Plugin v2 
You can default the values of Subscription Payment Term and Subscription Bill To Contact fields using the Default Values Plugin V2 in Quote Studio.
See the following sample code as an example:
global class DefaultValuePlugin implements zqu.DefaultValuesPluginV2 { global void initialize(zqu__Quote__c quote) { quote.zqu__Subscription_Payment_Term__c = 'Net 30'; //Search Contacts based on Zuora Account Id or based on Invoice Owner Id string zuoraAccountId = String.IsNotEmpty(quote.zqu__InvoiceOwnerId__c) ? quote.zqu__InvoiceOwnerId__c : quote.zqu__ZuoraAccountID__c; if(string.IsNotEmpty(zuoraAccountId)){ //Search Zuora Contact associated with Billing account or invoice owner using zuora 360; List<Zuora__ZContact__c> contacts =[Select Id, Zuora__External_Id__c,Name,Zuora__FirstName__c,Zuora__LastName__c from Zuora__ZContact__c where Zuora__CustomerAccount__r.Zuora__Zuora_Id__c= :zuoraAccountId]; quote.Subscription_Bill_To_Contact_ZuoraId__c=contacts[0].Zuora__External_Id__c; quote.Subscription_Bill_To_Contact_Name__c=contacts[0].Zuora__FirstName__c+' '+contacts[0].Zuora__LastName__c; } //Search Contacts based on Zuora Account Id or based on Subscription Owner Id string soldToAccountId = String.IsNotEmpty(quote.Subscription_Owner_ZuoraId__c) ? quote.Subscription_Owner_ZuoraId__c : quote.zqu__ZuoraAccountID__c; if(string.IsNotEmpty(soldToAccountId)){ List<Zuora__ZContact__c> contacts =[Select Id, Zuora__External_Id__c,Name,Zuora__FirstName__c,Zuora__LastName__c from Zuora__ZContact__c where Zuora__CustomerAccount__r.Zuora__Zuora_Id__c= :soldToAccountId]; quote.Subscription_Sold_To_Contact_ZuoraId__c=contacts[0].Zuora__External_Id__c; quote.Subscription_Sold_To_Contact_Name__c=contacts[0].Zuora__FirstName__c+' '+contacts[0].Zuora__LastName__c; } } }
Limitations 
When using Flexible Billing Attributes , keep the following restrictions and limitations in mind:
- In renewal quotes, it is not possible to change the invoice owner.
- In amendment quotes, invoice owners cannot be cleared out.