Documents like invoices, packing slips, quotes, and contracts often need to include different points of contact for shipping and billing purposes. To accomplish this, S-Docs supports three different types of special contact merge fields in templates that use Opportunity or Account as their base object: Shipping contacts, billing contacts, and generic record contacts. When users generate documents that include at least one special contact merge field from one of these categories, they will be prompted to select one contact for each category included (shipping, billing, or record) whose information will be merged into the document. This article will explain how to use and configure these merge fields.
The following shipping, billing, and generic record contact merge fields can be included in your templates:
When users generate a document containing any of these special contact merge fields, they will be prompted to select contacts from a picklist before completing the document generation process. Fields from the chosen contact records will populate the corresponding merge fields in the document.
Let's take a look at this example Opportunity invoice template with shipping and billing sections.
We included three special contact merge fields for the shipping contact (highlighted in green) and three special contact merge fields for the billing contact (highlighted in blue). We also included two special contact merge fields for an alternative contact (highlighted in orange). When a user selects this template and clicks Next Step, they will be prompted with the following screen:
Since we included all three types of special contact merge fields,  one contact selection section appears for each type. To select a contact, users can  click the spyglass icon to look up any contact record available in their org. They can also  use the Contact Quick Pick to select from a list of all contacts related to the base record that the document was generated from. This list can be modified to include additional contacts as well; see configuration steps below.
Once a contact is selected for one of the contact types, their information will appear within that section.
 The shipping and billing contact selection sections also include the related account's shipping and billing addresses. Once all contacts have been selected,  clicking Generate Doc will complete the document generation process.
As you can see, the contact information was merged into the document:
The Contact Quick Pick picklist allows users to easily choose any contact records related to the base record. S-Docs searches all lookup fields on the base object with links to the Contact or Account objects to populate this picklist. You can also include contacts from additional objects, such as junction objects, within this picklist. This is configured at the template level.
To include additional objects, navigate to the template editor for the appropriate template, and then click over to the Advanced Options tab.
In the Advanced Options tab, scroll down to the Configure Contact Lookup section. The picklist on the right lists each object whose contacts can be added to the Contact Quick Pick picklist. You can select multiple objects within this list.
You can additionally extend objects with custom fields.