Salesforce
What this does
Embeds the Quik! Forms Engine inside Salesforce so your users can select, prefill, generate, and sign Quik! forms without leaving Salesforce. You call the Quik! API to generate the form, then render the returned HTML inside a Visualforce page. A typical integration takes a Salesforce developer 5 to 15 days depending on the complexity of the user experience, and uses Apex, JavaScript, and a Visualforce page.
When to use this
Use this when Salesforce is your system of record and you want advisors or back-office staff to drive Quik! forms from a Salesforce record (an account, an opportunity, a custom object). If you are integrating from a non-Salesforce app, the same generate-then-render pattern applies, but the hosting mechanics below are Salesforce specific.
Key concepts
Salesforce controls its user experience and security tightly, which shapes how Quik! forms can be displayed. Understand these constraints before you build:
- You cannot drop the Quik! Form Viewer URL into an iframe. Salesforce blocks external references and scripts from running in an iframe inside a standard Lightning component.
- Render the full HTML, not a hosted URL. Do not set
HostFormsOnQuik = trueto get back a URL and display that. It is not a secure way to show forms inside Salesforce. Instead, take the complete HTML returned by the Execute HTML response and render it. - Use a Visualforce page as the host. Point an iframe at a Visualforce page and write the Quik! HTML into that page. The Visualforce page is what runs inside the iframe.
- Size the container for the whole form. The Quik! Form Viewer styles use absolute references. Give the container enough room to display the entire form, or content will be clipped.
Program flow
Salesforce (Apex) Quik! API Visualforce page
│ │ │
│ Build request ───────────▶│ │
│ (form IDs, prefill, │ │
│ signer roles) │ │
│◀── form HTML ──────────────│ │
│ Parse / decode HTML │ │
│ Write HTML into VF page ──────────────────────────────▶ │
│ │ iframe renders form │
- Build the request to the Quik! Forms Engine with your form IDs, prefill data, and signer roles.
- Send the request from Apex and receive the generated form HTML in the response.
- Parse the HTML out of the response.
- Write the HTML into a Visualforce page rendered inside your iframe.
A common pattern is to invoke the Apex remote action from JavaScript on the Visualforce page, then write the returned HTML into the iframe document with frameDoc.open(), frameDoc.writeln(result), frameDoc.close(). Listen for postMessage events from the form to capture submit and e-sign results.
Implementation notes
- Increase the callout timeout. Form generation can take longer than the default. Set the Apex
HttpRequesttimeout and the Visualforce remote action timeout to the maximum of 120000 milliseconds. - Custom Submit button. You can wire the form's Submit button to your own handler so the generated PDF posts back into Salesforce (for example, to push documents to DocuSign CLM or attach them to the record).
- Sample code is provided for your implementation only. Quik! sample code is for your own development use and is protected by copyright. Do not share it outside your implementation.
Draft note for the docs team: the original Confluence sample uses the SOAP
Executeendpoint and 5300/5500 service URLs. Before publishing, replace the SOAP envelope andSendSOAPRequestApex with the RESTexecute/htmlflow and Bearer-token authentication so the sample matches the rest of this site. The architecture and Salesforce-specific constraints above do not change.
Pitfalls
- Do not use
HostFormsOnQuik = truefor display inside Salesforce. It returns a URL, which is not a secure way to render forms in Salesforce. Render the full HTML instead. - Iframe script restrictions are the number one blocker. Salesforce will not run external scripts in a plain iframe. The Visualforce host page is what makes the form work.
- Clipped forms are usually a sizing problem. Absolute styles in the viewer need a container sized for the full form.
- Timeouts that are too short fail silently mid-generation. Set both the Apex and remote action timeouts to 120000 ms.
Other CRMs
The same pattern, generate the form through the API and render the returned HTML in your application, applies to other CRMs such as Wealthbox and Redtail. The hosting specifics (Visualforce, Apex) are unique to Salesforce. For another CRM, follow your platform's rules for rendering external HTML and making server-side callouts.
Related articles
- Authentication. Get the token you need before calling the API.
- Launch a Form. The base generate-and-open workflow you are embedding.
- Field Mapping. Map your Salesforce data onto form fields.
- Send Direct to DocuSign. Route the generated form for signature.
