Licenses & Permissions
Assign Licenses
Click on the Setup cog in the top right corner of Salesforce, then click “Setup”.
Navigate to Apps > Packaging > Installed Packages.
Next to the package name “Junodoc”, you will click the Manage Licenses link.
You will see the Licensed Users users section with buttons and links to add or remove licenses.
Click Add Users and select the checkbox next to those users you wish to apply licenses to.
Assign Permissions
Click on the Setup cog in the top right corner of Salesforce, then click “Setup”.
Navigate to Users > Users to view a list of all users in your org.
Click on the user that needs permissions to use Junodoc.
In the section at the top of this user screen are a series of hyperlinks.
Hover over the first hyperlink from the left “Permission Set Assignments” and a popup window will appear.
Click on “Edit Assignments” button in the “Permission Set Assignments” and a popup window.
There are four Junodoc available Permission Sets.
JunoDoc Admin
JunoDoc Read Only
Junodoc Full Admin Access
Junodoc Full Read Only Access
From the left panel, select the Permission Set that meets this users needs and click the arrow to move it to the Enabled side and click Save.
Add Junodoc Button on Layout
Click on the Setup cog in the top right corner of Salesforce, then click “Setup”.
The default Setup page is “Home”.
Click on “Object Manager” to the right of “Home”.
Search or scroll to the Object you wish to generate a PDF or email from using Junodoc and click on the Object hyperlink from the first column.
The default landing page is the “Details” section for this Object.
Buttons, Links & Actions
Click on the fifth item down the left navigation “Buttons, Links, and Actions”.
Click the “New Action” button on the top right of this page.
Select Action Type: Lightning Component
Select Lightning Component: JunoDOC:LGT_Dynamic_GeneratePDFCMP
Height: 1000px (this is the height of the document preview window that will open up)
Enter Label: Junodoc
*For the Label name in the step above, you may use any name you wish for this button. Once you enter a Label, the field below “Name” will auto-populate with the same name.
Click Save.
Page Layouts
From the left panel, click on Page Layouts
Your org may have one or many page layouts. Choose the Page Layout you wish to have the Junodoc button used on.
*If you are not sure which Page Layout is correct, you may click on the Page Layout Assignment button in the top right corner. This will reveal which Profiles are assigned to which Page Layouts. Choose the correct Page Layout here.
There is a small box near the top with the word “Fields” highlighted in blue. In this box, click on the “Mobile & Lightning Actions”.
From the list of available buttons on the right pane, click on the button created in the previous step and drag it down to the section titled : “Salesforce Mobile and Lightening Experience Actions”.
*As you drag the button, the destination area will highlight in green. This tells you where the button is supposed to go.
Click Save.
Navigating Junodoc
Click on the AppLauncher (the nine dots in the top left corner) and search for “Juno”.
Click on Junodoc.
Junodoc Builder
This is the tab where you start every document or email template.
Enter the name of the Object you wish to create a template for in the search box. Try searching for “Opportunity”.
Choose from one of the following four options (in this example, we will choose PDF Template):
- Create PDF Template
- Create Email Template
- Create Word Template
- Create Excel Template
Then click “Go To Template Builder”
We’ll cover the Junodoc Builder in the Junodoc Builder section below.
Junodoc Templates
The second tab is Junodoc Templates. This is where you have a list view of all existing templates.
Similar to all Salesforce List Views, you may select a View and choose which Columns will be displayed.
Click the Pin next to the view you would like as the default.
Click on any Doc Template name hyperlink to view the record details. Click “Edit Template” to make changes to an existing template.
When you are done editing a Junodoc Template, click Save and Close.
Junodoc Email
The third navigation choice is “Junodoc Email”. Click this navigation item to view the standard List View.
Make changes to the List View Columns as needed and Pin the preferred default List View.
Click the Name of the “Email Template Name” to view the record details.
Click Edit Template to make changes to the template.
Junodoc Triggers
The fourth navigation item is Junodoc Triggers.
Click on Junodoc Triggers and select the “Create New Trigger” button.
*You will create a Triggers once you have already created both PDF and email templates you wish to use in combination with Triggers.
Give the Trigger a name and use the search box to specify the object the Trigger will act upon.
For this example, we will name the Trigger “Sample” and select the “Opportunity” object and then click “Next”.
Filter Conditions
Click “Add Row” to generate the first Condition for your Trigger.
For this example, we will select “Stage” from the dropdown Field Name selector.
For the Operator, we will select “Contains”
For the Value, we will click on the blue search button, which will display all options from the Stage Picklist. We will select “Closed Won”.
Click Save and Next.
Trigger Action
On the Trigger Action screen, we will set a default field for the email recipient, by clicking on the Add Email Recipient button.
In the popup, we will leave the first field as default “To”.
For the Reference Type, we will choose “Reference”. This now gives us the option to select a field from our Opportunity object, which will be used to determine where we are getting our email address for the recipient.
Here, we will select “Contact”, then we will select “Email” in the next pick window and then select “Add Row”.
Click Save.
Next, we select the “From” email address. This defaults to using the Org Wide email address set for your Salesforce Org.
Under the “Select Templates” section, choose your preferred document template and email template that will be used for this trigger.
Click Save and Next.
Post Trigger Action
The Post Trigger Action are those actions that will happen once email and document have been sent.
Click “Add Row” to create a new Post Trigger Action.
Since we don’t really have anything specific for this example, we’ll choose Field Name “Description” and enter Value “Email Sent”.
Click Save
This will return you back to the main Trigger Screen. You will need to toggle the status of your trigger from Inactive to Active.
Junodoc Batch
The fifth navigation item is Junodoc Batch.
Junodoc Batch is used to send documents instantly upon specified criteria.
Record Selection
On the Record Selection step, search for the Salesforce Object this batch job will run against.
In this example, we’ll use the Opportunity Object.
For the moment, you can ignore the two input boxes “Formula for filter conditions” and the “Available for search”.
Click on (+) Button to add filter conditions. Notice the first condition is number one (1).
For this example in the Field Name list, we will choose “Stage”.
For the Operator, we will choose “Equals”.
Finally, for the Value, we will use the lookup button and select the Value “Closed Won”. *Notice that you can multi-select for this Value option.
Click the “Search Result” Button to show records meeting your criteria.
Click Save Criteria and name this criteria accordingly. In this case we will give the criteria a name “Closed Won”.
Click on the “Save New Criteria” Button.
Use the checkboxes from the Search Results to choose which records will be included in this Batch. This will move the chevron progress bar to “Doc Template”.
Click Next.
Doc Templates
Select from the list of available Doc Templates for the object selected in the previous stage.
In this example, we will be offered all Junodoc templates for the Opportunity Object.
Once you select a template, you will be able to click Next at the top right of the page.
Post Actions
Use the “Add Row” button to create Post Actions that will occur once the main batch job has completed.
Since we don’t really have anything specific for this example, we’ll choose Field Name “Description” and enter Value “Batch Sent”.
Click “Save Actions” Button.
Email or Download Documents
The final stage in the Batch process allows us to choose one of the following options.
Individual Documents | Will generate individual documents and allow user to download to local drive. |
Consolidated Document | Will generate a single consolidated document and allow user to download to local drive. |
Send Document | Will prompt user to specify email recipient(s) and select email template to be used when sending. |
Send Document
If you select to “Send Document”, the screen will prompt the user to choose where to send the email.
Select the “Add Email Recipient” Button.
Change the “Reference Type” from Text to Reference. This will allow you to select a Lookup from the Object.
Choose the “Contact” Lookup, then select the “Email” field and click “Add Row” and click Save.
Delete the default Email Mapping, which shows an email value.
Select the “From Email Address” which will display the Organization Wide Email.
Select an email template. In this example, we will choose an existing Junodoc Opportunity Email.
Scroll to the bottom and click “Send” from the bottom right corner of the screen.
Junodoc Settings
The sixth navigation item is Junodoc Settings.
General Settings
Toggle on or off Scheduled Triggers
Checkbox to enable the BCC of emails sent to the Sender.
Use the Save button to save changes.
JunoSign Settings
Make changes to the JunoSign email messages, site URL for the JunoSign activities and enable JunoSign using the checkbox.
Junodoc Object Settings
The seventh navigation item is Junodoc Object Settings.
Search for the Object you wish to define default settings for.
In this example, we will query for the Opportunity Object.
Add Email Recipient
Click the Add Email Recipient Button to define the default recipient for the selected Object.
For this example, we will change the Reference Type to “Reference” and then select the “Contact” field from the Opportunity Object and then select the Email field from the Contact Object.
Click Add Row.
From Email Address
Choose the default From Email address for the selected Object.
Template Selection
Choose either a Junodoc or a Salesforce Classic email template as the default for the selected Object.
Select the Junodoc Document template that will be the default for the selected Object.
Click Submit.
Building Templates
The first navigation item in Junodoc is the Junodoc Builder. Use Junodoc Builder to start building any document or email template.
Create PDF Template
To create a PDF Template, click on the first navigation menu item “Junodoc Builder”.
In the “Select Primary Object” window, type in the name of the Object this template will be used for.
Next, click on the “Create PDF Template” Button and then click the “Go To Template Builder” Button.
Using the Builder
Page Size
Choose a Page Size from the top picklist in the builder.
Available page sizes are as follows:
Page Size | W x H (Inches) |
A3 | 11.7 x 16.5 |
A4 Letter | 8.3 x 11.7 |
A4 Legal | 8.3 x 14 |
A5 | 5.8 x 8.3 |
Label 4×6 | 4 x 6.25 (Standard Shipping Label) |
Landscape |
Standard US Page Layout size is A4 Letter
Sections of Document
The document consists of three sections. The Header, Body and Footer. Access each of these sections from above the grid canvas.
Body
This is the main section of the document and will be populated with the bulk of your content.
Header
The header is the top of the document. Anything added to the header will be repeated on all pages. Typically, the company logo, name of document and date are added to the Header.
Footer
The footer will repeat on all pages of the document. Common uses are for business address or details the recipient will want to have such as a salutation or additional resources.
Saving Templates
Click Save Doc Template in the top right corner. You will be prompted for the Template name and also have the ability to name the Header and Footer features separately.
Before You Begin
Plan the document from top to bottom as best you can.
Build the document from left to right and work your way down the page.
Adding new elements in between existing elements may cause the document alignment to shift.
Build in extra text and table elements (leave blank if necessary), to give yourself options should you want to add to the template later
Test the document frequently while building. Always make sure the document is rendering the way you imagined it should.
Elements Panel
The far left Elements Panel is where the user obtains element objects to add to the document canvas.
Parent Fields
Parent Fields provides access to every field both on the selected Object and any Object with a Lookup on the main Object.
As an Example, if the main Object is the Opportunity and the Opportunity contains Lookups for other Objects, including Account, Contact, Contract, and Campaign; by using the Parent Fields Element, we can gain access to all of the Field APIs on any of these related Objects.
Using the Opportunity as the example, when the user clicks on the Parent Fields Element, they are presented with all available Objects related to the Opportunity.
We’ll click on the “Account ID” in the first box. A new box containing all of the Top-Level Fields from the Account Object are now displayed.
Clicking on “Account Name”, will then display the available API for the Account Name. Click on the “Copy Text” button to add this API to our clipboard and click “OK” in the lower right corner to close the window.
Once you have a Parent Field API on your clipboard, you will use it just as you would any other API on the Builder Canvas.
Object Fields
We replace the word “Object” with the name of the Object when using the Builder. In this example, we are using the Opportunity Object as our main Object. This means the section will be titled “Opportunity Fields”, as these are all of the available fields from the main Object we chose to build our template from.
Click the (+) symbol on the Object Fields Element to view all of the Fields available directly from our chosen Object.
The list can be long, so we include a search box to narrow down the list of fields in this view.
Type in the word “date” to show only those fields containing the word date.
To the right of the the Field is a two-document symbol, which the user clicks on to put that Field API on the clipboard.
To use these API fields, we first need to create a space on the Builder Canvas where we can paste the API.
The two options for creating spaces are Text and Table Elements, which are at the bottom of the Elements Panel.
Object Related Objects
We replace the word “Object” with the name of the Object when using the Builder. In this example, we are using the Opportunity Object as our main Object. This means the section will be titled “Opportunity Related Objects”, as these are all of the available Related Objects from the main Object we chose to build our template from.
Related Objects are their own container and may be dragged directly onto the Builder Canvas. There is no need to add Text or Table Element in order to use Related Objects.
Drag the Related Object onto the Builder Canvas.
Immediately upon releasing the the hand on the Builder Canvas, a Select Fields window pops up.
When working with tables, always position the far left side where you want it to be, then work your way from left to right, adjusting each column width to achieve the look you want.
It’s advised to leave the basic formatting of the table until you are happy with the preview of the document. Once you are satisfied with the preview, you can add color and shading to the table to achieve the desired look.
To edit an existing Related Object Table, click anywhere in the open Grid on the Builder Canvas, then click on the Pencil icon in the top left corner of the Related Object Table.
Select Fields
From the left “Available” panel, click on the Fields you wish to display in a table format for the Related Object.
As you click on the fields, they appear on the “Selected” side to the right. Feel free to re-order the Selected list by clicking on the Field and using the Up/Down arrows between the two windows.
Click Save to view the new Related Object Table.
Filters
The Filters tab on the Related Object window allows us to filter the contents of the Related Object and display only those records meeting specific criteria.
Using the Opportunity as an example, we select the “OpporunityLineItem” Related Object from the left and drag it onto our Builder Canvas.
Immediately, we are given the option to Select Fields. After we select fields, we click on the second tab “Filters” and choose a filter to give the results we are looking for.
Let’s say we only want to display Line Items where the Sales Price is greater than zero. We pick “Sales Price” field from the Line Item. Next we are presented with two more fields. One field to select the operator (equals, greater than, less than, etc) and a second field to manually enter a value.
We use the “greater than” operator from the picklist and then enter zero “0” in the input box.
This means any line item where the unit price is zero, will not be displayed in this table.
Calculation
The Calculation tab on the Related Object window allows the user to create a custom calculation within the document template.
Let’s say you want to calculate the “Extended Total” for each line item on the Opportunity. This would mean creating a calculation for Sales Price x Quantity. *We are still using the “OpportunityLineItem” Related Object in this example.
Click the copy icon (the two document image) on the Quantity field on the left pane and paste it into the field window on the right.
Notice the only items appearing on the left panel are those fields with values that may be calculated. There are no text fields.
You may only create a single calculation item (i.e. you cannot SUM field A and SUM field B, then multiply the two).
Examples of calculated fields:
SUM(quantity1)
SUM(totalprice1)
AVG(quantity1)
AVG(totalprice1)
Once you create the Calculated Field in the Related Object window, that newly created Calculated Field will appear in the left side Elements Panel under the Calculated Fields view. We cover the Calculated Fields Elements further in this manual.
Rendering
The fourth tab on the Related Object window is Rendering. This allows the user to control whether or not this Related Object will be displayed at all.
Staying with the Opportunity example. Let’s say you only wish to display this Related Object table when specific criteria are met. Let’s also assume that on the Opportunity we have a picklist for Customer Type and the two choices are Commercial and Retail.
The user selects the Field “Customer Type”, then they select Operator “equals” and in the Enter Value box they add “Commercial”.
If the Customer Type = Commercial, we will display this table. If the Customer Type = Retail, the condition will not be met and the table will not display.
To show an alternate version of the table, the user would create a second Related Object with a rendering rule that only displays the table when Customer Type = Retail.
Order By
The fifth tab on the Related Object window is Order By. This allows the user to make sure the displayed table information is ordered in the desired manner.
In the case of Opportunity Line Items, the user may wish to Order By the same order the items are shown on the Page Layout. In that case, the user would select the “Sort Order” from the dropdown and then select “Ascending” or “Descending” to meet their use case.
Other common uses might be sort by SKU or Quantity, depending on the look your are trying to acheive.
Group By Related Objects
The fourth item down on the Elements Panel is the Group By Related Objects. This comes in handy when the user wishes to create separate table groups.
Let’s say the user wants to display two lists of Opportunity Line Items. This first list would contain only items that are part of the “Hardware” product family and the second list would contain only those items that are part of the “Accessory” product family.
Aggregate Query Related Objects
Aggregate Query is the fifth item on the Elements Panel.
Images
Adding images is a two-part step.
New Images
If there are currently no images for this template, click the “Choose File” button and browse your local computer for images to upload.
Once the image has been selected, click the little blue icon to the right of “Choose File” to associate that image with this template.
Once the image is added to the Elements pane, it may be dragged onto the Builder Canvas.
Existing Images
Images already uploaded to the Elements pane may be dragged onto the Builder Canvas, placed and resized as needed.
Global Variables
These are the APIs available on any Object at any time. They are not Object specific, rather they are universally available to be used on any Builder Canvas.
You’ll see fields that include “Today”, “Now”, and “Organization”. These types of fields do not change with context, so we added them here under Global Variables.
Use the two-page icon to copy the API to the clipboard and then paste into either a text field or table element.
Calculated Fields
The eight button listed on the Elements panel, Calculated Fields are those custom calculated fields a Template Builder can use to create calculations on the document, rather than create a calculated field on the underlying Object.
Click the (+) to create a new Calculated Field.
The user may create a Calculated Field for any Field or Related Object Field referenced from the underlying Object.
For example, the Opportunity Page contains a Lookup to the Quote Object. Select Quote from the first Picklist and the screen updates to include all available Fields from the Related Quote Object.
Calculated Name
Give this Calculated Field a new for easy reference. Be sure to use open a closed brackets. Example [Name]
Calculated Field
Using the two-document copy-to-clipboard feature from the APIs on the left panel and paste the Field API values in the Calculated Field space on the right.
Use SUM and AVG for Calculations.
Text
There two types of Text Boxes you can drag onto the Builder Canvas, Single Line and Multiple Line.
Single Line are commonly used for headings or to create spacing where needed.
Multiple Line text boxes may be used for sentences, sections of text or formatted information such as an address.
Using HTML
Leverage HTML within the text boxes to achieve additional formatting outcomes.
Notice how we add the br after each line to format the text properly in a multi-line text box.
Juno Rocket, Inc.<br>
Accounts Payable<br>
696 San Ramon Valley Blvd<br>
Suite 208<br>
Danville, CA 94526
Text Formatting
Click anywhere on the Builder Canvas and then click back on the Text box to view the formatting options for the text box.
In the “Value” input box at the top of the Text Box Element, you can enter either plain text or a combination of HTML as shown just above.
Select the text to be Bold or Italic
Choose a Font Family. Sans-Serif is the default.
Add Padding to give the text box a little space around the edges. Usually a 2 or 4 for padding is a good start.
Font Size 12 is the default. 18 Works best for headings and sometimes 14 to give the font a decent reading size.
Font Color, Background Color, and Border Color all use similar color picker options. Click on the color bar, then click on the bottom of the popup (where it reads R G B) to reveal the color picker, which allows the user to switch to HEX and enter a specific color value as desired.
Choose Border Style and Border Width to meet your design requirements.
Select Horizontal alignment to meet the template needs.
To clone a text box, click the two-document button at the top of the Element Panel. Sometimes the cloned text box will shift to the top, so be sure to scroll up and look there for the cloned text box.
Table
The final item on the Elements Panel is the Table. Drag the Table onto the Builder Canvas to get started.
Release the Table where you want it and click away into an open area on the Builder Canvas. Now click back on the Table to view the Table Elements on the left pane.
Set the number of Rows and Columns. Place the left edge of the table where it should start. Going from left to right, adjust each column accordingly to achieve the desired spacing.
Tables generally look better when you add some padding. Using a padding of 4 or 6 is usually a good look.
Similar to the Text Formatting above, except you have additional options including Header Color, Color 1 and Color 2.
Header Color is just as it sounds. This will allow you to choose the color used on the header row.
Color 1 and Color 2 are the colors of the subsequent Rows. Color 1 will be the color of the first row immediately after the Header. Color 2 will be the row immediately after the Color 1 row. Using Color 1 and Color 2 allows you to define the alternating row colors that will be used on the table.
You may also customize each cell individually.
To clone a table, click the two-document button at the top of the Element Panel. Sometimes the cloned table will shift to the top, so be sure to scroll up and look there for the cloned table.