Objective
After reading this article, you will understand how to use and access the Advanced PDF Generation feature and enhance your business capabilities.
Introducing Advanced PDF Generation in Youreka
We’re thrilled to introduce the Advanced PDF Generation feature in Youreka, designed to enhance your document management capabilities. This upgrade includes a revamped user interface and introduces automated PDF generation based on customizable triggers, but does not replace the existing PDF creation feature found in Forms.
Key Features:
- Revamped User Experience: Experience a more condensed, efficient, and page-saving format in PDFs generated by Youreka.
- Automated PDF Generation: Previous method was a manual initiation via a button click. The new method utilizes triggers to automatically generate PDFs based on specific criteria, allowing for asynchronous processing aligned with business needs.
- Streamlined PDF Creation: Youreka provides a streamlined PDF generation process with pre-determined outputs, eliminating the need for multiple tools and reducing the burden of dual administration.
- Customizable Triggers: Define and configure triggers based on various conditions such as record updates, form submissions, or other events. Multiple triggers can be set up to handle different scenarios.
- Seamless Integration: Integrate automated PDF generation into your existing workflow with minimal disruption, thanks to a user-friendly setup and management process.
Key Benefits:
- Increased Efficiency: Save time and reduce manual effort by automating the PDF generation process. Focus more on strategic tasks rather than repetitive document creation.
- Enhanced Flexibility: Customize PDF generation to fit your specific business processes. Define precise criteria for when PDFs should be created, ensuring alignment with your operational needs.
- Streamlined Workflow: Improve operational efficiency by integrating automated PDF generation into your workflow. PDFs are generated in the background based on predefined triggers, minimizing manual intervention.
- Better Control and Visibility: Gain greater control over document management with the ability to monitor and manage PDF generation tasks in real time. Ensure that generated documents meet your requirements and are accessible when needed.
- Reduced Error Rates: Minimize the risk of human error associated with manual PDF generation. Automated triggers ensure that documents are created consistently and accurately based on your criteria.
How to Set Up:
For Advanced PDFs, we are utilizing Amazon Web Services (AWS) to aid in our PDF creation. Luckily, no setup on the AWS side is required for this integration but when upgrading to the Uranium Package, clients will come across a message requesting Third Party Access. In order to utilize Advanced PDFs, approval will need to be granted.
Now let's head into Youreka to finalize the setup process. Before continuing, make sure the Advanced PDFs license has been added into the organization’s environment. Please reach out to the Youreka team to gain access to this additional paid feature for further assistance.
Admins should follow the steps below to ensure that Advanced PDF Generation is properly set up and configured in your organization's environment.
Advanced PDF Creation Trigger Setup
- Go to Salesforce Setup
- Under setup, search for Apex Triggers
- Select whichever trigger applies to your organization's business logic for Advanced PDF Creation. For example, if an Advanced PDF needs to be created based on form status, the trigger should be included in the Form_Trigger.
- Scroll to the bottom of this article to see examples of triggers that can be defined..
- Once a trigger has been selected, click Edit and include the Trigger
- Make sure that the trigger has AT LEAST the following two defined for Advanced PDFs to work
- form.disco__Needs_PDF_Created__c = true
- Call pdf creation job
- Click Save! You have now defined when an Advanced PDF will be created!
Advanced PDF Creation Flow Setup
If you prefer to set up a flow instead of a trigger, follow these steps:
-
- Create a new flow in salesforce setup on the Form Object
- Set the criteria when you would like the PDF generated. For this example, we're generating a pdf when a form has been "Submitted".
- Then create a record update to request the PDF by checking the "disco__Needs_PDF_Created__c" box.
- Finally, create an action within the flow that calls our Apex action called "create pdfs for forms that have disco__Needs_PDF_Created__c checked".
- We'd recommend delaying this action (at least by 1 minute) to ensure that all photos have been published within salesforce first.
PDF Customization
Header and Footer Setup:
- Go to Salesforce Setup-> Custom Settings-> Youreka Public Settings-> Manage-> Edit
- Find the settings labeled "PDF Custom Header" and "PDF Custom Footer"
- Enter your custom header and footer text
- Press Save
Logo Setup:
- Switch to Salesforce Classic (may not show up in Salesforce Lightning)
- Visit the "Documents" tab
- Find the "logo_for_youreka_pdfs" document
- Replace the document with your newly desired image
Custom CSS:
- If you want to customize your Advanced PDFs experience, custom CSS can be applied to the disco__PDF_Custom_Css__c - Pdf field on the Form Template Object.
Final Setup Steps
- For any form that needs an Advanced PDF created for it, the “Needs PDF” checkbox needs to be checked on the Form Record
-
- This checkbox can be checked manually OR automatically if its defined in the a trigger
- Scroll to the bottom of this article to see examples of various triggers that can be defined to automatically include checking the Needs PDf checkbox
-
- Add Content Versions to your Page Layout to see the Advanced PDF records.
- If the Advanced PDF records need to be seen by others besides the owner of the PDF record, please include the following in the Form Apex Trigger. This trigger on form defines the Content Document Link Sharing from owner -> organization wide view with Advanced PDFs license.
trigger PDF_CDL_Trigger on disco__Form__c (before update) { List<ContentDocumentLink> cdls = new List<ContentDocumentLink>(); Set<Id> formIds = Trigger.newMap.keySet(); // Query to find content versions related to form List<ContentVersion> cvs = [SELECT Id,disco__Form__c,ContentDocumentId,LastModifiedDate FROM ContentVersion WHERE disco__Form__c IN :formIds ORDER BY LastModifiedDate DESC LIMIT 1]; Map<Id, List<ContentVersion>> formIdToCVs = new Map<Id, List<ContentVersion>>(); for (ContentVersion cv : cvs) { if (!formIdToCVs.containsKey(cv.disco__Form__c)) { formIdToCVs.put(cv.disco__Form__c, new List<ContentVersion>()); } formIdToCVs.get(cv.disco__Form__c).add(cv); } for (disco__Form__c formNewValues : Trigger.new) { Id formId = formNewValues.Id; String newStatus = formNewValues.disco__Advanced_PDF_Generation_Status__c; String oldStatus = Trigger.oldMap.get(formId).disco__Advanced_PDF_Generation_Status__c; List<ContentVersion> cvs = formIdToCVs.get(formId); if (cvs.size() == 0 || newStatus == oldStatus || newStatus == null || !newStatus.startsWith('Success')) { continue; } // Create CDL for CV ContentDocumentLink cdl = new ContentDocumentLink( ContentDocumentId = cvs[0].ContentDocumentId, LinkedEntityId = formId, ShareType = 'V', Visibility = 'InternalUsers'); cdls.add(cdl); } insert cdls; }
- Now you’re all set! Once Advanced PDFs are created, you can find the PDF files under the Form’s Content Versions!
- NOTE: Based on how many PDF creation jobs are in queue, your PDFs should be created in just a minute or so!
What's Included in the PDF?
- Standard and Linked Sections
- Questions and Answers displayed in a Table layout
- Multi-Column Sections
- Table Sections
- Shown in Portrait View
- Shows all Table Section Columns and Rows
- Custom Column Sizing will not be shown in the PDF
- Text will wrap within its cell
- Max row height for a cell is a full page before text is truncated
- A4 Page Size Support
What’s Not Included in the PDF?
- Sketch Pad Question
- Digital Asset Repository
- Table Sections Styling defined in Template Builder (Cell border color, cell fill)
- Support of Custom CSS Fonts
Security Considerations:
AWS Integration (Advanced PDF Generation): AWS is a cloud industry leader with robust security frameworks, including ISO 27001, SOC 2, and PCI DSS certifications. AWS allows you to control where data is stored, ensuring compliance with regulations like HIPAA for healthcare and FINRA for financial services. Data is encrypted both in transit and at rest, leveraging AWS’s advanced encryption protocols. We are leveraging Dispatch’s AWS account and Dispatch is SOC2 type 2 audited.
This is a list of the following data sent and stored in AWS.
- company name
- org Id
- is sandbox
- org type
- username
- user id
- form name
- template name
Customers maintain control over how and when their data is shared with these services, allowing for fine-tuned data governance. The AWS integration is configured to ensure that no customer data is exposed without explicit approval. Customers will need to opt into these features first.
Youreka’s integrations align with industry-standard best practices for security. This is critical for clients who operate in regulated industries like healthcare, finance, or government.
Data shared through the integrations is protected using end-to-end encryption and role-based access control (RBAC). This minimizes the risk of unauthorized access, ensuring only the right people within an organization can access the information.
Best Practices:
- For the best user experience, we recommend utilizing 5 columns or less in a Table Section.
- If a Long Text answer cell exceeds one page, it will truncate and NOT flow into the next page. There is a known issue where the last line of the long text answer may be cut off.
- In the defined trigger or flow,, you may want to set a delay on the PDF creation itself so all the proper data is captured in Salesforce.
Examples of Advanced PDF Creation Triggers:
Scenarios for when an Advanced PDF Generation can occur:
Work Order Completion: Generate PDFs for all forms under a work order when the status of the work order is marked as "Complete."
Service Appointment Status: Automatically create PDFs for all related forms when a service appointment status changes to "Closed" or "Completed."
Time-Based Flows: Generate PDFs for specific forms at the end of each week or month based on a time-driven trigger.
Form Submission: Automatically trigger PDF creation when a specific form is submitted, such as a customer feedback form or inspection form.
Task Completion: Trigger the creation of PDFs when all tasks within a project or workflow are marked as "Done."
Field Value Reaches Threshold: For example, generate PDFs when a numeric field (like ARR value) crosses a defined threshold.
Example of a Trigger that can be included in an APEX Trigger:
Trigger PDF_Form_Trigger on disco__Form__c (before insert, before update, after insert, after update) {
if (Trigger.isBefore) {
for (disco__Form__c form : trigger.new) {
if (form.disco__Status__c == 'Submitted') {
form.disco__Needs_PDF_Created__c = true;
}
}
}
else if (Trigger.isAfter) {
// Call pdf creation job
disco.Invoke_CreatePDFs.startCreatePDFs(new List<Integer>{0});
}
}
Subprocessors:
Amazon Web Services, Inc.
Dispatch Technologies, Inc.
Comments
0 comments
Article is closed for comments.