---
title: Configure Salesforce CPQ for Advanced Billing
url: https://docs.maxio.com/selling/salesforce-for-advanced-billing/configuration/configure-salesforce-cpq-for-advanced-billing
applies_to: Advanced Billing
updated: 2026-08-24
---

# Configure Salesforce CPQ for Advanced Billing

Enable CPQ (Configure, Price, Quote) functionality in Salesforce so your quote configuration screen can add, edit, or upgrade Advanced Billing Subscriptions directly. This is optional, and only needed if your organization uses Salesforce CPQ.

> **Important:** Follow these steps exactly as written. They configure Salesforce CPQ (SBQQ) directly, so none of it can be verified against Maxio's own codebase.

## Add custom fields

Add two fields to the Quote Line object so CPQ can link a quote line to an Advanced Billing Subscription Preview.

**To add the custom fields**

1. Navigate to **Setup** > **Object Manager** > **Quote Line** (`SBQQ__QuoteLine__c`).
2. Create a new Lookup field to the **Maxio Subscription Preview** object, with these values:

   - Field Label: **Maxio Subscription Preview**
   - Field Name: **Maxio_subscription_preview**
3. Create a new formula field, with these values:

   - Field Label: **Maxio Subscription**
   - Field Name: **Maxio_subscription**
   - Formula Type: **Checkbox**
   - Formula: `NOT(ISBLANK(Maxio_subscription_preview__c))`

## Create custom actions for CPQ

Add three custom actions so users can create, edit, and upgrade an Advanced Billing Subscription from the Quote Line Editor.

**To create the custom actions**

1. Navigate to **Setup** > **Object Manager** > **Custom Action** (`SBQQ__CustomAction__c`).
2. Find and edit the **Label** field (`SBQQ__Label__c`).
3. Add these three values to the picklist:

   - New Maxio Subscription
   - Edit Maxio Subscription
   - Upgrade Maxio Subscription
4. Click the **Custom Actions** tab.
5. Click **New Custom Action** and set these values:

   - Name: **New Maxio Subscription**
   - Display Order: **2**
   - Type: **Button**
   - Active: **true**
   - URL Target: **Replace Page**
   - URL: `/apex/CHRGFYNG__ChargifyCPQRedirect?id={!Id}&type=create`
   - Page: **Quote Line Editor**
   - Location: **Quote**
   - Action: **Save and Navigate**
   - Label: **New Maxio Subscription**

   ![the Custom Action Edit form for New Maxio Subscription, set to Save and Navigate](https://docs.maxio.com/content-images/selling/salesforce-for-advanced-billing/configuration/configure-salesforce-cpq-for-advanced-billing/35396830960269_mceclip1.png)
6. Click **Save**.
7. Click **New Custom Action** again and set these values:

   - Name: **Upgrade Maxio Subscription**
   - Display Order: **3**
   - Type: **Button**
   - Active: **true**
   - URL Target: **Replace Page**
   - URL: `/apex/CHRGFYNG__ChargifyCPQRedirect?id={!Id}&type=add`
   - Page: **Quote Line Editor**
   - Location: **Quote**
   - Action: **Save and Navigate**
   - Label: **Upgrade Maxio Subscription**

   ![the Custom Action Edit form for Upgrade Maxio Subscription](https://docs.maxio.com/content-images/selling/salesforce-for-advanced-billing/configuration/configure-salesforce-cpq-for-advanced-billing/35396830962189_ba484d68-86eb-4066-8277-80ab47579283.png)
8. Click **Save**.
9. Click **New Custom Action** one more time and set these values:

   - Name: **Edit Maxio Subscription**
   - Display Order: **1**
   - Type: **Button**
   - Active: **true**
   - Icon: **edit**
   - URL Target: **Replace Page**
   - URL: `/apex/CHRGFYNG__ChargifyCPQRedirect?id={!Id}&type=edit&quoteid={!SBQQ__Quote__c.Id}`
   - Page: **Quote Line Editor**
   - Location: **Line**
   - Label: **Edit Maxio Subscription**

   ![the Custom Action Edit form for Edit Maxio Subscription, placed at the Line location](https://docs.maxio.com/content-images/selling/salesforce-for-advanced-billing/configuration/configure-salesforce-cpq-for-advanced-billing/35396794989197_4a3ac4c9-900d-411c-b70e-ad462f406ee8.png)

## Create triggers

Add two Apex triggers so quote and quote line changes sync with Advanced Billing.

**To create the triggers**

1. Navigate to **Setup** > **Create** > **Objects** > **Quote** (`SBQQ__Quote__c`).
2. Create a new trigger, then copy and paste this code:

   ```text
   trigger ChargifyQuoteTrigger on SBQQ__Quote__c (before insert, before update, before delete, after insert, after update, after delete, after undelete) {
   	CHRGFYNG.ChargifyCPQAPI.QuoteTrigger(Trigger.operationType, Trigger.old, Trigger.new, Trigger.oldMap, Trigger.newMap);
   }
   ```

3. Navigate to **Setup** > **Create** > **Objects** > **Quote Line** (`SBQQ__QuoteLine__c`).
4. Create a new trigger, then copy and paste this code:

   ```text
   trigger ChargifyQuoteLineTrigger on SBQQ__QuoteLine__c (before insert, before update, before delete, after insert, after update, after delete, after 		undelete) { 
   CHRGFYNG.ChargifyCPQAPI.QuoteLineTrigger(Trigger.operationType,Trigger.old,Trigger.new,Trigger.oldMap,Trigger.newMap);
   }
   ```

## Configure the Quote Line Item Editor

*(Optional)* Improve the Quote Line Editor's display of Products and Subscriptions.

**To configure the Quote Line Item Editor**

1. Navigate to **Setup** > **Installed Packages** > **Salesforce CPQ** > **Configure** > **Line Editor**.
2. Enable **Visualize Product Hierarchy**.
3. Move the product name to the top of the list.
4. Navigate to **Setup** > **Create** > **Objects** > **Quote Line** (`SBQQ__QuoteLine__c`) > **Field Set**.
5. Click **Edit** for the Line Editor.
6. Move the product Code to after the Product Name.
7. Add the **Maxio Subscription** field.
8. Click **Save**.

   ![the Quote Line Item Editor field set, with Maxio Subscription added among the quote line fields](https://docs.maxio.com/content-images/selling/salesforce-for-advanced-billing/configuration/configure-salesforce-cpq-for-advanced-billing/35396830972173_mceclip0.png)
