Getting Started with Lapps
The Manage Lapps UI
The Manage Lapps UI is available under the Apps section of the main navigation panel –
You can create new Lapps here and view and edit previously created Lapps. The grid shows you the following information for each Lapp –
Column Name | Description |
Name | The name of the Lapp. |
Status | The status (Draft, Published, Unpublished) of the Lapp in the test and live environments. |
Last Published On | The date the Lapp was last published in the test and live environments. |
API Call Statistics* | The number of successful or failed API calls for the test and live environments. Hover the mouse over the success or failure statistics to see a breakdown of the number of successful and failed calls by environment. |
Modified On | The last modified date of the Lapp. |
Modified By | The user who last modified the Lapp. |
Actions |
|
You can also sort the grid to show Lapps by status, modified by and modified on filters.
*API call statistics are shown for last 30 days by default and cached every 24 hours. It does not change with the grid’s filter. You can view the latest values using the refresh button provided alongside.
Plan Details
On the panel section on the right of the page, click Plan Details to view information related to your plan. For any plan related queries or issues, contact support@leadsquared.com.
Create a Lapp Offline Using Lapps SDK
For details, see Lapps SDK for Offline Development.
Create a Lapp Using the Editor
To create a Lapp –
- On the Manage Lapps page, click the Add Lapp button.
- Enter a name and description for the Lapp.
- Select the Coding Mode as Editor (write your code directly in the Lapps code editor).
- Next, click the Notification icon for a quick introduction to the Lapp features.
Note: The only permitted special characters are underscore “_” and hyphen “-“. The name cannot start with special characters.
Here the coding mode was selected as Editor –
Create a Lapp Using a Zip File
- On the Manage Lapps page, click the Add Lapp button.
- Enter a name and description for the Lapp.
- Select the Coding Mode as Zip (use your own code files packaged in zip format).
- Next, click the Notification icon for a quick introduction to the Lapp features.
Note: The only permitted special characters are underscore “_” and hyphen “-“. The name cannot start with special characters.
Lapps Marketplace
If you don’t want to create a new Lapp from scratch, you can try some of our ready to use Lapps. The code for these Lapps is production-ready so you can either edit it to suit your needs or start using it right away.
You can search or navigate through the categories on the left pane to find Lapps specific to your industry. Click on a Lapp to select it, then click Import.
You can download and edit the Lapp by clicking the icon highlighted below or publish the Lapp immediately.
For Lapp templates that contain multiple files (shown above), zip upload/download mode will automatically open. For Lapps templates that contain a single file (main.js), the Lapp editor will open (shown below) –
Note:
- For templates that open in the Lapp editor, be sure to read all the instructions written before the start of the code in ‘main.js’ file.
- For zip style templates, read the instructions carefully. You may need to set additional settings to make the Lapp work, for example, some templates contain an ‘additional-settings.json’ file. In this case you’ll need to download the zip code and edit the required additional settings.
Example – Push Lead to a LeadSquared Account
This Lapp pushes a lead from one LeadSquared account to another LeadSquared account. You can simply edit this Lapp to push leads from an external system to your LeadSquared account.
The Lapp presupposes the following assumptions –
- This Lapp is being called on the lead create event (either through Webhooks or through Rules if you want to add filters).
- You have access to the target LeadSquared account and its API access and secret keys.
- You will add all the lead fields in the ‘main’ function that are required to be passed on.
- Once you publish this Lapp, it will be available in the list of available Lapps in Webhooks, Rules or Automation actions.
- The Lapp code will change slightly if you intend to use it on say, “Lead Stage Change” event.
The Lapp requires you to create the following settings –
LS_API_BASE_URL | The base API URL for the target LeadSquared account |
LS_ACCESS_KEY | LeadSquared API Access key |
LS_SECRET_KEY | LeadSquared API Secret key |
Next Steps
Here’s everything you need to know about Writing Code in Lapps.