Loading
Salesforce now sends email only from verified domains. Read More
Manage Your Quotes with CPQ
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Enable Batch Document Generation

          Enable Batch Document Generation

          Automate the Salesforce CPQ process of creating a quote document and sending it to the quote’s primary contact. The automation saves times for sales reps working in a high-volume environment. (Salesforce CPQ Managed Package)

          Required Editions

          Available in: Salesforce CPQ Spring ’15 and later
          1. If you’re using a version of Salesforce CPQ before 27.1, add your org’s instance name as a remote site.
            1. From Setup, enter Remote Site Settings and then click Remote Site Settings.
            2. Click New Remote Site.
            3. Provide a name for your remote site.
            4. In the Remote Site URL field, enter https://XXX.salesforce.com, where XXX is your instance name.
              Note
              Note The “na” that begins any Salesforce org must be capitalized. For example, https://NA35.salesforce.com.
            5. Add the Document Status field to your quote page layout.
            6. Fill out the Email Template ID on the quote record. Otherwise, Salesforce CPQ doesn’t send the quote document to the quote’s primary contact.
          2. Enable batch document creation in your org’s package settings.
            Admins only need to perform this step once after installing Salesforce CPQ. If the Documents tab doesn’t have the Request Authorization button, your org already has batch document creation enabled.
            1. From Setup, enter Installed Packages and then click Installed Packages.
            2. Find the Salesforce CPQ package and click Configure.
            3. From the Documents tab, click Request Authorization.
            4. Allow Salesforce CPQ to access your basic information, access and manage your data, and perform requests on your behalf.
            5. Click Save.
          3. Use the Apex class MassQuoteDocumentSender to define a batch document creation schedule.
            1. Make sure your quotes have values for their primary contacts and quote template IDs.
              MassQuoteDocumentSender picks up only quotes with a pending document status. We recommend creating a workflow rule that changes a quote’s document status to Pending when it’s ready for document creation.
            2. From Setup, enter Apex Classes and then click Apex Classes.
            3. Click Schedule Apex.
            4. Enter a name for your job. For example, you could use “GenDocs.”
            5. Use the Apex Class lookup to find and select MassQuoteDocumentSender.
            6. In the Schedule Apex Execution section, enter a time range, frequency, start time, and date for your recurring document generation.
            7. Click Save.

          When Salesforce CPQ performs a batch document generation, it changes the Document Status field of each related quote to either Sent or Failed. The admin running the MassQuoteDocumentSender Apex class also receives an email showing whether the batch generation was successful or failed. If the batch generation failed, the email shows the errors that occurred while the class was running.

          In Salesforce CPQ Spring ’17 and later, you can control the language of batch-generated quotes on by using the quote’s Quote Language field. If this field is blank, the language of batch-generated documents for that quote defaults to the language chosen in your org’s user settings. Quote-level language selection lets you establish document language before the generation process begins, making it useful for batch document generation — just make sure all the quotes involved in the batch generation process have a quote language specified. This field works for only batch generation; it doesn’t affect document language when a sales rep clicks Generate Document. In that case, the rep still has to choose a document language on the Generate Document page.

           
          Loading
          Salesforce Help | Article