Enhance your CRM data with CustomJS by integrating seamlessly with Salesforce. CustomJS allows dynamic links to landing pages with forms that enrich CRM data automatically, ensuring detailed and accurate information. This versatile SaaS solution supports custom automations and integrations, dynamically generating forms for tasks like SEPA mandates and damage reports, and automatically populating Salesforce CRM fields, streamlining data collection and management.
1: Create Your Function: Design your CustomJS function using a layout, a Form partial, and a Thank-You partial. Tools like VueForm Builder can be helpful.
2: Deliver Form-Partial: Implement a switch that returns the Form partial for a GET request.
3: Receive Form Request: For POST requests, render the Thank-You partial and push the data to Salesforce, as shown in the example code snippet below:
var nunjucks = require("nunjucks");
let content;
const layout = variables.Layout;
const successContent = variables['Success Content'];
const formContent = variables['HTML FORM'];
switch (event.httpMethod) {
case "GET":
content = nunjucks.renderString(formContent, { event });
break;
case "POST":
content = nunjucks.renderString(successContent, { event });
break;
}
return nunjucks.renderString(layout, { content });
Execution through Direct UI Links: Integrate CustomJS into Salesforce UI via button links to trigger actions like creating PDFs, sending emails, or executing other APIs directly from Salesforce.
Execution through Salesforce Workflows: Use webhooks to trigger CustomJS functions through automatic workflows whenever, for example, an opportunity changes status.
Enhance Salesforce data records or create new records using CustomJS Forms. Accessing the Salesforce API requires setting up a connected app.