All Zoho CRM entities are modelled as modules having classes, methods and instance variables applicable to that particular entity. ZCRMRestClient is the base class of the Python SDK. ZCRMRestClient has methods to get instances of various other Zoho CRM entities.
- zcrmsdk is the base class of the SDK.
- This class has, methods to get instances of various other Zoho CRM entities.
- The class relations and hierarchy of the SDK follows the entity hierarchy inside Zoho CRM.
- Each class entity has functions to fetch its own properties and to fetch data of its immediate child entities through an API call.For example: a Zoho CRM module object will have member functions to get a module’s properties like display name, module Id, etc, and will also have functions to fetch all its child objects.
The class relations and hierarchy of the SDK follows the entity hierarchy inside Zoho CRM. The class hierarchy of various Zoho CRM entities are given below:
zcrmsdk
API
ORG
get
MODULES
get
post
put
delete
getAllDeletedRecords
getRecycleBinRecords
getPermanentlyDeletedRecords
search
SETTINGS
getFields
getLayouts
getCustomViews
updateCustomViews
getModules
getRoles
getProfiles
getRelatedLists
ACTIONS
convert
USERS
get
ATTACHMENTS
uploadFile
deleteFile
downloadFile
uploadLink
uploadPhoto
downloadPhoto
deletePhoto
FUNCTIONS
executeFunctionsInGet
executeFunctionsInPost
As appearing in the hierarchy, zcrmsdk class will have instance variables to fetch its own properties and to fetch data of its immediate child entities through an API call.
For example, to call an API to get module data, the request should be
zcrmsdk.API.MODULES.{operation_type}
The operation types can be GET, POST, PUT, DELETE or CREATE.
Accessing record properties
Since record properties are dynamic across modules, we have only given the common fields like createdTime, createdBy, owner etc, as ZCRMRecord’s default members. All other record properties are available as a map in ZCRMRecord object.
To access the individual field values of a record, use the getter and setter methods available. The keys of the record properties map are the API names of the module’s fields. API names of all fields of all modules are available under,
Setup → Marketplace → APIs → CRM API → API Names