サンプルコード - Java SDK
Java SDKを通じて、すべてのZoho CRM APIを使用し、カスタムアプリケーションでデータ同期を実行できます。Java SDKで利用できるAPIメソッドのサンプルコードを紹介します。
RESTクライアントの演算
これらのメソッドには、Zoho CRMのデータにアクセスするために、アプリケーション内に含める認証手順が含まれます。
メソッド | 説明 |
---|---|
getOrganizationDetails | To fetch all the details regarding your organization in your CRM account. |
getCurrentUser | To fetch information about the user who is currently accessing Zoho CRM's data through your application. |
getCurrentUserEmailID | To fetch the email ID of the user, who's is currently accessing CRM's data. |
getAllModules | To fetch the list of all the modules available in your CRM account. |
getModule | To fetch information about a particular module in your CRM account. |
組織の演算
これらのメソッドには、Zoho CRMの組織のデータを取得するために、アプリケーション内で実行できる処理が含まれます。たとえば、組織内のすべてのユーザー(従業員)の一覧をいつでも取得できます。
メソッド | Description |
---|---|
getUser | To fetch information about a specific user in your CRM account. |
getAllUsers | To fetch the list of all the users from your CRM account. |
getAllActiveUsers | To fetch the list of all the active users in your CRM account. |
getAllDeactiveUsers | To fetch the list of all the non-active users in your CRM account. |
getAllActiveConfirmedUsers | To fetch the list of all the active and confirmed users in your CRM account. |
getAllAdminUsers | To fetch the list of all the users who have admin level permissions in your CRM account. |
createUser | To create a new user in your CRM account. |
updateUser | To update details of an existing user in your CRM account. |
deleteUser | To delete a user from your CRM account. |
getAllProfiles | To fetch the list of all the profiles that were created in your CRM account. |
getProfile | To fetch information about a particular profile in your CRM account. |
getAllRoles | To fetch the list of all the roles that were created in your CRM account. |
getRole | To fetch information about a particular role in your CRM account. |
getAllTaxes | To fetch the list of all organization taxes. |
getTax | To fetch information about a particular organization tax. |
getVariables | To fetch information about the variables created for your organization. |
getVariableGroups | To fetch information about the variable groups created for your organization. |
createVariables | To create new variables for your organization. |
updateVariables | To update the details of variables created for your organization. |
タブの演算
これらのメソッドには、Zoho CRM内でタブ単位でデータを修正するために、アプリケーション内で実行できる処理が含まれます。たとえば、タブからすべてのデータを取得したり、特定のデータを検索したり、データを削除したりなどができます。
Note
SDK 1.x.xのupdateRecords()のメソッドは、バージョン2からmassUpdateRecords()に変更になりましたのでご注意ください。
メソッド | 説明 |
---|---|
getAllFields | To fetch the list of all the fields that are available in a module. |
getLayoutDetails | To fetch information about a particular layout of a module. |
getAllLayouts | To fetch the list of all the layouts that are available for a module. |
getCustomView | To fetch information about a particular custom view of a module. |
getAllCustomViews | To fetch the list of all the custom views that are available for a module. |
getAllRelatedLists | To fetch the list of all the related lists that are available for a module. |
getRecords | To fetch the list of all the records that are available in a module. |
searchRecordsByWord | To search for records in a module based on a Word(text). |
searchRecordsByPhone | To search for records in a module based on the Phone number. |
searchRecordsByEmail | To search for records in a module based on Email address. |
searchRecordsByCriteria | To search for records in a module based on a criteria specified by the user. |
updateRecords | To update details of multiple records in a module. |
massUpdateRecords | To update details of a single field across the given record IDs in a module. |
createRecords | To create a new record in a module. |
deleteRecords | To delete existing records from a module. |
getAllDeletedRecords | To fetch the list of all the records that were deleted from a module. |
getRecycleBinRecords | To fetch the list of all the records that were deleted from a module and stored in the recycle bin. |
getPermanentlyDeletedRecords | To fetch the list of all the records that were permanently deleted from a module. |
upsertRecords | To insert/update records in a module. |
getTags | To fetch the list of all the tags that were created for a module. |
getTagCount | To fetch total count of the tags that were created for a module. |
createTags | To create new tags for a module. |
updateTags | To update details of existing tags for a module. |
addTagMultipleRecord | To associate tags to records in a module. |
removeTagMultipleRecord | To disassociate tags from records in a module. |
データの演算
これらのメソッドには、特定のデータ内に保管されている詳細情報にアクセスしたり、詳細情報を修正したりするために、アプリケーション内で実行できる処理が含まれます。たとえば、データの詳細情報の取得、新しいデータの作成、既存データの更新、メモ/添付ファイル/写真のアップロードなどが可能です。
メソッド | 説明 |
---|---|
create | To create new records. |
update | To update existing records. |
delete | To delete existing records. |
convert | To convert records(Leads to Contacts/Deals). |
getNotes | To fetch the notes that were attached to a record. |
addNote | To add a note to a record. |
updateNote | To update a note that was previously added to a record. |
deleteNote | To delete a note from a record. |
getAttachments | To fetch the list of attachments of a record. |
uploadAttachment | To upload an attachment to a record. |
uploadLinkAsAttachment | To upload a link as an attachment to a record. |
downloadAttachment | To download an attachment that was uploaded to a record. |
deleteAttachment | To delete an attachment that was added to a record. |
uploadPhoto | To upload a photo to a record. |
downloadPhoto | To download a photo that was added to a record. |
deletePhoto | To delete a photo that was added to a record. |
addRelation | To make a relation between two records. |
removeRelation | To remove a relation between two records. |
addTagSpecificRecord | To add tags to a specific record. |
removeTagSpecificRecord | To remove tags from a specific record. |
getRelatedListRecords | To get the list of related list records. |
タグの演算
これらのメソッドを使用すると、CRM内でタグを追加したり、タグを削除したりできます 。
メソッド | 説明 |
---|---|
updateTag | To update details of an existing tag. |
deleteTag | To delete a tag. |
mergeTag | To merge two tags. |
変数の演算
これらのメソッドを使用すると、組織用の変数を更新したり、削除したりできます。
メソッド | 説明 |
---|---|
getVariable | To fetch information about a specific variable created for your organization. |
updateVariable | To update the details of a specific variable. |
deleteVariable | To delete a specific variable. |
getVariableGroup | To fetch information about a specific variable group created for your organization. |