Create Deals from Leads

Create Deals from Leads

Hello, I would like to do the following:

1) An email arrives with one of the following keywords in the subject: Quote, Quote, Quote, Request.

2) I create a potential customer from that filtered email (Leads)

3) I create a quote with that possible client, having some fields with a standard completion, for example: Deal name:
* Quote via email
* Stage "To quote"
*etc.

The problem is as soon as I want to create such deals, I was able to test with an example code to create a task but I got stuck when assigning the value to the variables.

Program:

  1. completeDate = zoho.currentdate.addDay(3);
  2. mp = Map();
  3. mp.put("Created By",zoho.loginuserid);
  4. mp.put("Modified By",zoho.loginuserid);
  5. mp.put("Subject","Email");
  6. mp.put("Due Date",(06 / 02) / 2023);
  7. mp.put("Status","Waiting for input");
  8. mp.put("Priority","High");
  9. mp.put("Subject","Quote to ");
  10. //after 'Price to' add: + pricename
  11. mp.put("Required Action","Send Quote");
  12. mp.put("Send Notification Email",true);
  13. mp.put("Description","this is a test message");
  14. mp.put("Related To","Quote ID:");
  15. response = zoho.crm.createRecord("Tasks",mp);
  16. new_task_id = response.get("Id");