The Quip Document Lightning Component lets users work with fully functional Quip documents, spreadsheets, slides, and chat rooms directly within Salesforce objects and records. All of your favorite Quip features are there—comments, @mentions, Live Apps, and more. It's all the collaboration you need right where you need it.
To set up a Quip Document Lightning Component on Salesforce records and objects you must be a Salesforce and Quip Admin. After you go through the steps to integrate Salesforce and Quip this process takes about 10 mins per component. Here's an outline for how to do it:
- 🔑What you Need
- 🔗Connect Quip and Salesforce
- 📥Creating a Field for the Quip Document Component
- ☁️Embed the Component on objects and records
- 📬Use mail-merge syntax to pre-fill new documents from a template
- 🏆Best Practice Recommendations
For an overview of all Quip & Salesforce integration functionality options: Quip & Salesforce Integration Summary
For the sake of flexibility, Salesforce admins can configure the Quip Document Component in different ways to accommodate different needs.
|Allow different documents on each record||
This option lets users attach different documents to different records, or create and embed new documents from scratch. It also provides a way for admins to programmatically attach pre-selected documents to different records on the same object.
|Use the same document for every record||
This option allows admins to choose a single, pre-existing document to be embedded on every record associated with a given object.
|Use a template to create new documents for each record||
This option lets admins specify a template from which users can create and embed new documents on a per-record basis. Any Quip document can be used as a template, and mail-merge syntax can be used in the template to pre-fill documents with information from the record.
|Use different templates for different records||
This option allows admins to specify different templates for different records on the same object. It's a bit more advanced than the other approaches here, as it requires admins to programmatically pre-populate the component field with different template URLs, rather than manually choose a single template URL.
- You will need to be a Salesforce Admin for your instance.
- You will need to have a Quip Enterprise license or be on a Quip Enterprise Trial.
- You will need to be a Quip Admin if the Quip site already exists.
- If you can see the Admin Console in Quip, you are a Quip Admin.
- If you are a paying Quip Business customer and/or are not a Quip Admin, contact your Quip AE, Salesforce AE, or Quip Support.
Before you get started, make sure you've connected your Salesforce org to your Quip site by enabling Files Connect and setting up the appropriate permissions.
- For a detailed guide of this 20 minute process: Salesforce Lightning Integration Setup Instructions with Pictures (2019)
Part three - Creating a Field for the Quip Document Component URL
If you are using the same document for every record, please skip to Part four. For other configurations, Quip needs to store the URL of the template/document in an editable Salesforce field. This field needs to be editable by the end user that would create the template. To create a new URL field, please use the instructions below.
For the object you will be using, go to Object Manager > Fields & Relationships > New Custom Field.
- Name the field
- Establish field-level security
- Add to page layouts
Part four - Embed the Component on objects and records
After completing the 9-step Quip setup process in Salesforce, open the Lightning App Builder.
Step 1. In Lightning App Builder > Search for the “Quip Document” component > drag the Quip Document component from the Components panel onto the page.
Step 2. Choose an option for how you want the component to behave:
If you select Allow different documents on each record, you'll be asked to choose a field for the component to store the URL of embedded documents.
- If that field's value is blank, users will be able to choose existing documents to embed, or create and embed new documents from scratch.
- Alternatively, you can programmatically pre-populate the field with Quip document URLs of your choice.
If you select Use the same document for every record, you'll be asked to specify a Quip document URL.
That document will be embedded on this page, and every record associated with this page.
If you select Use a template to create new documents for each record, you'll be asked to specify:
- A Quip template URL. Users will be able to create new documents on each record based on that template.
- A custom field of the type “URL,” in which the URLs of newly created documents can be stored.
- Best practice: Use mail-merge syntax to pre-fill new documents from a template
If you select Use different templates for different records, you'll be asked to specify:
- A component field in which template URLs can be located.
- A component field in which the URLs of newly created documents can be stored.
- Best practice: Use mail-merge syntax to pre-fill new documents from a template
Step 3: If requested, choose the default permissions for any new documents that are created using the Quip document component.
- View and edit: Anyone in your company will be able to view and edit created documents, both within the Quip component and directly through the document URL.
- View only: Anyone in your company will be able to view created documents, both within the Quip component and directly though the document URL. In order to edit the document, they'll need to request access.
- Must request access: People will need to request permission to view and edit the document.
Note that if you put the Quip Document component on a page that isn't a record—a home page, for example—you'll be limited to one option: Use the same document for every record. In this case you'll need to provide the URL for a single, pre-existing Quip document. The component will otherwise be fully functional, however, and you'll be able to work with that document as you would any other.
Quip supports basic mail-merge syntax for auto-filling data from Salesforce. This syntax supports standard and custom fields that are directly on the object, as well as foreign keys up to one additional level. Note that any Quip document can be used as a template - nothing special required.
To discover the field name of your fields:
- Object Manager
- Fields & Relationships
- Use the “Field Name” column to find the right syntax for your reference field
- This is a standard field on the
Accountobject so we just reference it directly.
Ownerdoes not need
__rbecause it's a standard field; we can just reference it directly.
__ris needed in
Accountobject has a custom lookup field called
CustomField__cis not a lookup to another object, we can directly call the field name.
__rfor custom reference fields. Standard fields do not need to have
- see https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_and_custom_objects.htm
The basic structure works like this:
On an Account object, for example, that contains a Description field, you can pull the data from that field by inserting the following anywhere in a Quip document:
As mentioned above, you can expand foreign keys on an object up to one level up. For example, if Account contains a foreign key referencing an Owner, and Owner has a Name field, you can pull the data from that field by inserting the following anywhere in a Quip document:
A few notes:
- Please reference the field name in this syntax, not the field label. If your template syntax isn't working, double check you're referencing the correct data.
- The document is auto-filled based on data at the time of its creation. It won't be automatically updated to reflect any future changes in that data.
- Your requests are limited to a maximum of 250 fields, with no more than 20 lookup fields.
For more information about formatting requests, see the SOAP API developer guide's inventory of standard objects and fields.
Part five - Best practice recommendations
Sizing recommendations for the Quip Document Component layout
|Document||Main page section||900 pixels|
|Document||Page sidebar||600 pixels|
|Slide Deck||Main page section||900 pixels|
|Chat Room||Main page section||600 pixels|
|Chat Room||Page sidebar||600 pixels|
Click on the hyperlinks below to get started with your own version of these pre-built templates.