12.12 SDK fieldAction: Set lead converted
This SDK function allows the system to perform a series of automations that allow the correct and complete conversion of the lead.
In fact, this function can be used exclusively within the standard lead conversion process available in the "Process manager" section with the wording "Lead conversion". (Figure 1)
Figure 1 (click on the image for a larger graphic resolution)
The following operations are performed by the function:
1) References to the lead in the vte_email_directory table are deleted
2) If the lead is set among the favorites of some user, the function replaces it with the company or contact involved in the process depending on the value selected in the "Transfer elements linked to" field.
N.B: if the "empty" value is selected, the lead will not be replaced.
3) If the lead is present among the static newsletters of some campaign, the function replaces it with the company or contact involved in the process depending on the value selected in the "Transfer elements linked to" field.
N.B: if the "empty" value is selected, the lead will not be replaced.
4) The value of the "converted" column of the vte_leaddetails table is set to "1".
This allows you to completely hide the visibility of the lead on the interface side (as if it had been deleted).
5) The vte_leadconvrel table is populated to track the Conversion Date, lead crmid, company crmid, contact crmid and opportunity crmid.
The first parameter is the crmid of the lead being converted.
The second parameter is the crmid of the company (created or existing).
The third parameter is the crmid of the contact (if created).
The fourth parameter is the crmid of the opportunity (if created).
The fifth parameter is the id of the user who triggered the process.
To prevent the system from executing points 4) and 5) and therefore the lead from being hidden on the interface side, a sixth parameter must be added in which to insert the static value "false". (Figure 2)


Figure 2 (click on the image for a higher graphic resolution)

