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
- Define the The Form Id to generate a PDF request for
- param.formId = [x]
- Call pdf creation job
- disco.Invoke_CreatePDFs_v3.startCreatePDFs()
- Define the The Form Id to generate a PDF request for
- Optional fields to include in the trigger
- The language in which the PDF should be generated
- param.pdfLanguage = [x]
- Salesforce User ID that will own the generated PDF (defaults to current user if not specified)
- param.pdfOwnerId = [x]
- Timestamp defining the earliest time the PDF generation should be processed (if not specified, uses Youreka Public Settings PDF Delay Time for delay calculation)
- param.earliestCreationTime = [x]
- The language in which the PDF should be generated
- 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 with the appropriate entry condition.
- Add the Action element and select the Enqueue PDF creation for forms action (apex-disco__Invoke_CreatePDFs_v3)
- Set the formId to the Triggering Forms record ID
- Optional:
- Add earliestCreationTime, pdfLanguage, pdfOwnerID
- Add a delay to the PDF generation by -
- Setting a PDF Delay Time in Youreka Public setting or
- earliestCreationTime within the apex action or
- Adding the apex action within a scheduled path of the flow.
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.
Earliest Creation Time
- In some scenarios, PDFs can get created before the proper records and/or photos have had time to update in Salesforce. To prevent any confusion, organizations can set a delay time to PDF creation.
- The "Earliest Creation Time" field exists in the PDF Queue Records.
- The time in this field defines the earliest point in which a PDF can be created for that form record.
- Before the Watt release, clients passed a List<Integer> setDelayInMinutes. Clients should update any triggers/flows to no longer pass anything to startCreatePDFs call and instead use this field to define the delay.
EU Based Environments
If you are generating Advanced PDFs, but are based in the EU region, you will have to do the following to ensure proper PDF Generation.
-
Head to Youreka Public Settings
-
Navigate to Custom Settings
-
The AWS Endpoint field should be set to “EU”
-
Once that is completed, navigate to Remote Site Settings
-
Add eu.api.youreka.io and save
You are now all good to go for Advanced PDF Creation!
Final Setup Steps
- The PDF Request Queue Objects will exist as a Tab in Salesforce. That is where you can view all the records associated with PDF Requests.
- Optional: Add PDF Request Queue Objects to your Form Page layout to view your PDF Queue records and their statuses.
- Each PDF Request Queue object will contain information about:
- Form Answers
- Images
- Various Request details (that you can define.. View the screenshot below to see an example)
- Each PDF Request Queue object will contain information about:
- Optional: Add Files to your Page Layout to see the PDF created for a form record.
Now you’re all set! Once Advanced PDFs are created, you can find the PDF Queue Request Object or in the Files Related List on the Form!
- NOTE: Based on how many PDF creation jobs are in queue, your PDFs should be created in just a minute or so!
- If you run into any issues with generating a PDF, please reference the status field on the PDF Queue Request Record. This field will indicate the status of the Advanced PDF Generation for the form and if any errors exist.
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
- Translations - Visit this article for more information
- 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.
- PDFs can be created instantly, even before data has had enough time to update in Salesforce. You may want to define a delay on the PDF creation in the PDF Delay Time field within Youreka Public Settings so all the proper data is captured in Salesforce.
Troubleshooting:
How to retry PDF generation if there is a failure -
This will attempt to create pdfs for forms where there was an error during the latest pdf creation. If there are still errors after retrying, please reach out to Youreka support for help.
- Open PDF Queue Request Record
- Change the status back to created so that a second attempt can be done
- Open Developer Console
- Select Debug->Open Execute Anonymous Window
- Paste
Queue_CreatePDFs_v2.processQueuedPDFRequests();
- Click execute
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:
// Create PDF requests for forms that are being submitted
List<disco.Invoke_CreatePDFs_v3.PDFRequestParams> pdfParams = new List<disco.Invoke_CreatePDFs_v3.PDFRequestParams>();
for(disco__Form__c form : trigger.new) {
DISCO__Form__c oldForm = trigger.oldMap.get(form.Id);
// Check if form status is changing to SUBMITTED
if(form.disco__Status__c == 'SUBMITTED') {
disco.Invoke_CreatePDFs_v3.PDFRequestParams param = new disco.Invoke_CreatePDFs_v3.PDFRequestParams();
param.formId = form.Id;
param.pdfOwnerId = '005150000065hzk';
param.pdfLanguage = 'French';
pdfParams.add(param);
}
}
// Call PDF generation if we have any forms to process
if(!pdfParams.isEmpty()) {
disco.Invoke_CreatePDFs_v3.createPDFRequests(pdfParams);
}}
Subprocessors:
Amazon Web Services, Inc.
Dispatch Technologies, Inc.
Comments
0 comments
Article is closed for comments.