Created
April 15, 2022 03:17
-
-
Save jeznag/b9b75315ac2526bd0b0cbde7962bdc86 to your computer and use it in GitHub Desktop.
automatically create a new lead when a missed call comes in from an unknown number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call_record = zoho.crm.getRecordById("Calls",call_id); | |
caller_phone_number = call_record.get("Subject").getSuffix("Missed call from "); | |
new_lead_data = {"First_Name":"Unknown","Last_Name":"From missed call from " + caller_phone_number,"Phone":caller_phone_number,"Lead_Source":"Missed Call from unknown number"}; | |
create_resp = zoho.crm.createRecord("Leads",new_lead_data); | |
new_lead_id = create_resp.get("id"); | |
update_call_payload = {"What_Id":new_lead_id,"$se_module":"Leads"}; | |
update_resp = zoho.crm.updateRecord("Calls",call_id,update_call_payload); | |
info update_resp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if anyone knows, but is there a way to get the Caller ID information (specifically name)?