Do not index
Do not index
In this issue of Behind the Build, we showcase how to create a Paperform app for Salesforce. Salesforce, a cloud-based CRM platform, helps businesses connect with customers and manage data. Integrating with Salesforce's AppExchange ecosystem unlocks growth opportunities by accessing a vast customer base and enhancing data connectivity.
Paperform is a flexible online form builder that combines thoughtful design with smart digital features making it a suitable choice for a demo app in this ecosystem.
Why Integrate with Salesforce?
Integrating your app with Salesforce provides significant advantages. By leveraging Salesforce’s platform, you can:
- Access a vast customer base: Reach over 150,000+ customers using Salesforce.
- Enhance data connectivity: Seamlessly connect and manage data across platforms.
- Unlock growth opportunities: Tap into Salesforce’s ecosystem to expand your reach and capabilities.
The demo
This demo app lets users:
- Add and save Paperform API keys: Securely store API keys for easy data access.
- Connect a Paperform form: Link a Paperform form to Salesforce.
- Import submissions as leads: Automatically add form submissions to Salesforce as new leads.
This integration simplifies lead management, improves data accuracy, and saves time. It follows a common pattern for third-party apps, making your software work well with other software.
The build
Here’s a high-level overview of the critical development concepts to build the app.
Lightning Components
Lightning Web Components (LWC) is Salesforce’s framework to build custom user interfaces, web and mobile apps, and digital experiences on the Salesforce Platform. They are custom HTML elements built using HTML and JavaScript. You can build lightning components through Salesforce’s dx commands or through the lightning app builder.
For this component, we needed a single tab to collect an API key and select the form.
User Profiles and Updating Permissions
Salesforce offers fine-grained user permissions and controls. To make pages visible, ensure they are activated and have the required permissions for profiles and permission sets.
Apex Classes
Apex classes are written in Apex, Salesforce's Java-like language. They are user-defined templates that define the properties and actions of objects. Apex classes are useful for interacting with APIs and creating actions.
This project consists of two main Apex classes:
- Paperform API service: Interacts with the Paperform API and Salesforce’s leads object.
- Paperform Setting Manager: Saves the user-inputted API key and selected form, and retrieves that information when the user revisits the Paperform settings.
Custom Settings
Custom settings create and manage custom data at the organization, profile, and user levels. Custom settings data is stored in the application cache, allowing efficient access without repeated queries.
This app includes protected custom settings for the API key and the selected form ID for adding leads. The Apex classes mentioned above save and retrieve information from these settings to know which forms and account in Paperform to pull submissions from. Salesforce custom settings have a field limit of 255 characters, so the Paperform API token is split into 4 to accommodate the longer length.
They are secret only in managed packages. If you are creating an app for the Salesforce AppExchange, you'll use managed packages. Otherwise, avoid using custom settings for sensitive information.
And that’s an overview behind the build, covering the critical concepts used to create the app. If you’re interested in similar AppExchange breakdowns or custom Salesforce app development, feel free to reach out!