How to use the API to capture leads from external sources


In order to receive leads into the CRM from external systems, you need to use the dedicated API for receiving leads.

 

Here's a sample for using the 'simbla-capture-data' API. The parameters for this function can be sent by either 'get' or 'post'. You have the flexibility to add parameters as required in the lead.

 
https://apps.simbla.com/functions/{{application_id}}/simbla-capture-data?username={{user_name}}&password={{password}}&Name={{name}}&Email={{email}}

Parameters:

application_id: Your application ID.


To locate your Application ID, follow these steps:

First, navigate to 'More' in the main menu and select 'Administration'. Once there, click on 'Tables', followed by 'Settings'. Your 'Application_ID' will be displayed in this section.

User_name and password: These credentials will serve as the means of authentication for using the API. You have the option to create a dedicated user specifically for the API, or you can use an existing user. It's crucial to ensure that whichever user you select possesses sufficient permissions to add new leads.

 

Name and Email: this is the data you want to transfer in the API. You can add more fields as needed.

 

The API is programmed to automatically search for duplicates using email and phone data. If the system will find a similar record, It will mark the new record with a duplicated status.

 

Advanced settings

You can modify this default functionality of the API by adjusting the following configuration record in "Config" table.

If the table does not exist, it must be created. Create a table called "Config" with two fields named "Name" (string) and "Value" (object)

 

Add a new record.  In the Name Field add the value:

 CaptureDataLeads

In the Value field add:

 
{ "checkForDuplicateFields": [ "Email", "PhoneNumber" ], "setOnDuplicate": { "field": "Status", "value": { "__type": "Pointer", "className": "LeadStatuses", "objectId": "1000000004" } } }

With these settings, you can modify the behavior of the API.