Unable to map CRM task to a record

Unable to map CRM task to a record

Use case: I want to programatically create a call for a given Contact (has a record id) and at the same time, the call is related to a Deal (another record id). This is easily possible when creating such task in the CRM UI.

It should be possible programatically as well based on the sample input on https://www.zoho.com/crm/help/api/v2/insert-records-examples.html#insert-calls

  1. // POST /crm/v2.1/Calls
  2. {
  3.     "data": [
  4.        {
  5.             "Call_Duration": "28:50",
  6.             "Owner": {
  7.                 "id": "2883756000000133013"
  8.             },
  9.             "Call_Purpose": "Prospective",
  10.             "Call_Status": "Attended",
  11.             "Billable": false,
  12.             "Who_Id": "2883756000000153031",
  13.             "Call_Start_Time": "2018-01-09T22:30:00+05:30",
  14.             "Subject": "Call from +13012670261",
  15.             "Call_Type": "Inbound",
  16.             "$se_module": "Contacts",
  17.             "What_Id": "2883756000000153028"
  18.         }
  19.     ]
  20. }

For my use case the payload is slightly modified as I want to relate the the call to a deal, so it has "two dimensions", primary - contact, secondary - deal:

  1. {
  2. ...
  3.   "Who_Id": "2883756000000153031", // Contact record id
  4.   "$se_module": "Deals",
  5.    "What_Id": "2883756000000153028" // Deal record id
  6. ...
  7. }

However, this does not work as intended and the Contact ID does not get written in the call record.

FYI When calling the POST API with $se_module set to 'Contacts',  it throws an error (which is probably correct).


  1. {
  2.   ...
  3.    "Who_Id": "2883756000000153031", // Contact record id
  4.   "$se_module": "Contacts",
  5.    "What_Id": "2883756000000153028" // Deal record id
      ...
    }

Does it imply a bug in the POST api endpoint for a given combination of dimensions?

Any ideas please?