After publishing a Lapp to any environment (test or live), you can call it using LeadSquared Rules.
Business Use Case
Let’s say you’ve written a Lapp to change the ‘Revenue’ field of a sales activity from Rupees to Dollars. You can call this Lapp using rules, so every time a sales activity gets created, the Lapp gets called and changes the value of the revenue field.
- Navigate to My Account>Settings>Rules and Notifications and click Create.
- Select an Event to trigger the rule (Activity Create – Sales Activity for example), then click Set Conditions.
- Configure Conditions you want to trigger the rule based on (For example, you can set conditions so the rule only executes when a sales activity is created for say, ‘Sample Product’). Click Provide Action Details when you’re done.
- Under the Action Type drop-down, select Call Lapp. Under the Content column click the edit (pencil) icon. Choose a Lapp, select the environment (live or test), then click Save. You can also pass data to the Lapp by entering key-value pairs in the Query String field. Click the Provide Additional Details button to continue.
- Enter a name and description for the rule and click Save and Enable or just Save to continue and enable the rule later.