Microsoft Dynamics 365 app and custom fields

  • 10 February 2023
  • 2 replies

Userlevel 1

I’m curious of other people’s experience with the Microsoft Dynamics 365 CRM Zapier app and mainly around custom lookup fields on certain entities, I have found several issues with the app which looks like it’s not usable at all (as in will always be broken based on the payload data it sends). It doesn’t appear to confirm to the Dynamics 365 API requirements in some areas for fields like lookups.

Here’s an example payload Zapier is sending when testing a Contact and lead creation zap. The contact record is created just fine, and then the ID of the contact is passed to the lead step. I suspect the contact is created because it’s just standard fields and no lookups. 

When getting to the lead entity, it gets more complicated with custom fields and lookups and I think where things start going bad.

Example payload values being sent by Zapier on a zap test.

campaignid: /campaigns(c5b08212-bfa8-ed11-aad1-6045bdd28837)
ccl1000_acknowledged: true
ccl1000_closeenquiry: true
ccl1000_enquiryautocompleted: true
ccl1000_enquiryclassification: 100000000
ccl1000_enquirytypeid: /ccl1000_enquirytypes(d79ac383-f455-e511-93f4-0050569e3c1b) ccl1000_originatingactivitytype: 940220002
ccl3016_enquirysubmittedby: 999200003
ccl3016_enquirytype: 999200002
leadsourcecode: 100000003
parentcontactid: 5023e4bd-3efc-e511-80df-c4346bac29f8


  1. campaignid, ccl1000_enquirytypeid and parentcontactid do not have @odata.bind in the property name. This should be added at the end to work and is required for relational/lookup fields
  2. ccl1000_enquirytypeid is a custom field and I think where possibly Zapier will start to struggle. Technically you can determine custom fields via EntityDefintions, but this is a custom lookup to a custom entity. It does however appear to know this given the value uses the plural entity name (ccl1000_enquirytypes), so there’s at least some handling.
  3. The contact value for parentcontactid needs to be /contacts(5023e4bd-3efc-e511-80df-c4346bac29f8) (I could technically, implement a formatter to adjust this value, but I cannot modify the property names being used highlighted above.

Taking the original payload data, converting to JSON and sending directly through the Dynamics 365 Web API allows this data to work (assuming the campaign and contact ID are valid).

"campaignid@odata.bind": "/campaigns(c5b08212-bfa8-ed11-aad1-6045bdd28837)",
"ccl1000_acknowledged": true,
"ccl1000_closeenquiry": true,
"ccl1000_enquiryautocompleted": true,
"ccl1000_enquiryclassification": 100000000,
"ccl1000_enquirytypeid@odata.bind": "/ccl1000_enquirytypes(d79ac383-f455-e511-93f4-0050569e3c1b)",
"ccl1000_originatingactivitytype": 940220002,
"ccl3016_enquirysubmittedby": 999200003,
"ccl3016_enquirytype": 999200002,
"leadsourcecode": 100000003,
"parentcontactid@odata.bind": "/contacts(5023e4bd-3efc-e511-80df-c4346bac29f8)"

However in it’s current state it appears the Zapier app is quite broken and won’t work for custom fields or more advanced uses.

Given you don’t seem to be able to modify the payload data with the app, has anyone had success with custom POST requests using the Dynamics 365 API. I know how to use the API without Zapier, the issue is having a client that is authenticated with OAuth, the Microsoft Dynamics 365 CRM app takes care of all of that and ideally it would be great to be able to use it, just currently it doesn’t appear to handle lookups well.

For reference I have also sent these findings through a support ticket, I’m more curious on any other users who happen to use the Microsoft Dynamics 365 CRM app with Zapier and if there’s any customisations or workarounds I’m not aware of?



2 replies

Userlevel 1

The error also indicates that Zapier is sending the custom field with the wrong name based on the error. In this case it looks like Zapier is sending the value as the SchemaName when it should be the LogicalName i.e. all lowercase.

Failed to create a lead in Microsoft Dynamics 365 CRM
The app returned "Error identified in Payload provided by the user for Entity :'leads', For more information on this error please follow this help link ----> InnerExcep...". Error identified in Payload provided by the user for Entity :'leads', For more information on this error please follow this help link ----> InnerException : Microsoft.OData.ODataException: An undeclared property 'ccl1000_EnquiryTypeId' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.

Only ccl1000_enquirytypeid@odata.bind works as per testing the Dynamics 365 API directly.

Userlevel 1

Speaking with Zapier support I was given access to the older 1.8.5 version of the Dynamics 365 app and this works much better, so the new version has some issues and would recommend anyone having issues specifically with custom fields or 400 bad request errors due to LogicalName vs SchemaName handles to be asked to provide a zap with access to the old version, you can then clone/duplicate for re-use if needed.

The older 1.8.5 app appears as a custom integration rather than being under the main list, as that’s for the newer app.