Home Developers

Developers

Christian
By and 1 other
3 articles

How to Create and Manage Incoming Webhooks in Simply CRM

How to Create and Manage Incoming Webhooks in Simply CRM Webhooks are a powerful way to automate actions in Simply CRM by sending real-time data to external services whenever specific events occur. This guide will walk you through the process of creating and managing incoming webhooks within Simply CRM. What is an Incoming Webhook? An incoming webhook is a method of receiving HTTP requests from external services whenever certain events happen within Simply CRM. This can be used to integrate Simply CRM with other applications, automate workflows, or trigger external actions based on CRM events. Creating an Incoming Webhook To create an incoming webhook, follow these steps: 1. Navigate to Module Settings - Go to the module for which you want to create an incoming webhook. - Open the settings by clicking on the settings icon within the module. Module Settings 2. Go to Record Creation - In the settings menu, select "Record Creation." This is where you’ll set up your incoming webhook. Record Creation 3. Fill in Webhook Details - You’ll be presented with a form to fill in the webhook details. Below is an explanation of each field. Webhook Details - Webhook Name: Enter a descriptive name for your webhook. This name will help you identify it later. - Module Name: Select the module in which the record will be created when the webhook is triggered. - Is Active: Toggle this option to enable or disable the webhook. If disabled, the webhook won’t send data even if triggered. - Mandatory Parameters: Here you can specify the required fields that must be filled when creating a record via the webhook. Fields marked with red text are mandatory. Mandatory Parameters Adding Fields to Create a Record When setting up the incoming webhook, you’ll need to define the fields that will be sent in the HTTP request when the webhook is triggered. 1. Select the Module Field - Choose the specific fields from the selected module that you want to include in the webhook request. Module Field 2. Specify the Value Type - For each field, you can specify the type of value it will contain: - Value: Use a fixed value that you enter in the field. - Field: Use the value from a specified field in the record. - Expression: Use an expression to dynamically generate the value. - Reference: Use a reference to another record or module. Testing and Saving Your Incoming Webhook After setting up your incoming webhook, it's important to test it to ensure it works as expected. 1. Test the Webhook - Use the testing functionality within the module to simulate the event that would trigger the webhook. Verify that the data is being sent correctly to the external service. 2. Save Your Webhook - Once you’re satisfied with the setup and testing, save your webhook. Managing Existing Webhooks You can manage your incoming webhooks by going back to the module’s settings where you initially created them. Here, you can: - Edit: Make changes to an existing webhook. - Deactivate/Activate: Toggle the webhook’s status without deleting it. - Delete: Permanently remove a webhook if it’s no longer needed. Tips for Using Incoming Webhooks Effectively - Ensure Security: Always verify that the external service you’re sending data to is secure. Consider using HTTPS and validating the data sent via the webhook. - Monitor Performance: Keep an eye on the performance of your webhooks, especially if they are critical to your workflows. Ensure that the external services receiving the webhooks are reliable. - Documentation: Maintain proper documentation of your webhooks, especially if multiple team members will manage them. Need Help? If you have any questions or need assistance with setting up your webhooks, our support team is here to help! You can reach out to us via chat or email us at support@simply-crm.com. By following these steps, you can efficiently set up and manage incoming webhooks within Simply CRM, ensuring seamless integration and automation of your business processes.

Last updated on Sep 15, 2024

Simply CRM Web Service & API Documentation

This documentation describes the REST based application programming interface (the API) published by Simply CRM. It is meant as a reference document for everyone who uses our API’s. We recommend that you go through the tutorial before you attempt reading this documentation. All structural data including response from the API is represented as JSON strings. Each entity has a specially formatted ID that can be used to look up an entity’s type and the record. Create is the one case that does not require an ID. <a href="http://Simply_url/webservice.php?operation=">http://Simply_url/webservice.php?operation=</a> [operation type]&sessionName=[session Name]&[operation specific parameters] Currently, Simply CRM supports the following operations: - getchallenge - login - create - retrieve - update - delete - sync - query - listtypes - describe - logout - extendsession SessionName The key that is used to uniquely identify the current session. This information should be sent to the server as part of each request. Web service The web service API supports the security model followed in the Simply web user interface. The login process uses a two step challenge/response scheme. Data types used by the API All responses will have the format shown below. If the request is processed successfully, then the format is: If a failure occurs while the request is being processed, you will receive the following response format: Response { <br></br> success:Boolean=true <br></br> result:Object //The Result object <br></br>} Response { <br></br> success:Boolean=false <br></br> error:ErrorObject <br></br>} ErrorObject {<br></br> errorCode:String //String representation of the error type<br></br> errorMessage:String //Error message from the api<br></br>} ErrorCode is a string representation of the error type. SimplyObject SimplyObject is a map representing the contents of a crm entity based object. All reference fields use the ID type, which assigns a unique number to each object. This field is present for all objects fetched from the database. ID format objectTypeId 'x' objectId<br></br> <br></br>objectTypeId - Id of the object type. This is generated uniquely for each entity supported by the web service API and returned in the result of describe operation as idPrefix.<br></br> <br></br>objectId - id of object in database. This is a globally unique id for objects of the given entity. Map An associative array of key value pairs. Usually used in the create operation. TimeStamp A long representation of the number of seconds since the Unix epoch. Operations Login Login is a two step process : First we generate a unique token calling getChallenge. And then use that token and our unique access key to generate a session ID which acts like an authentication identifier. Important: It is required to enter the IP in the Whitelist IP field under My Preferences on the user’s profile in Simply CRM that is being used to access the API. Get Challenge Used to get a challenge token from the server. Request Type: GET username: A Simply username operation: getchallenge ``` GET /webservice.php?operation=getchallenge&username=[username] **Response** { success: true, result: { token: String, serverTime: TIMESTAMP, expireTime: TIMESTAMP } } ##### Login Login to the server using the challenge token obtained through the get challenge operation. login(username:String, accessKey:String): LoginResult **Request** **Type**: POST **operation**: login **username**: A Simply username. **accessKey**: An md5 of the concatenation of the challenge token and the user’s web service access key. **Response** { success: true, result: { sessionId: String, userId: String, version: String, SimplyVersion:String } } **Note:** In *accessKey, ‘*K’ is uppercase. ### Create Create a new entry on the server. An entity is a record in one of Simply’s modules. To get the list of fields for the create operation you can call **Describe** operation first create(element:Map, elementType:String): SimplyObject **Request** **Type**: POST **operation**: create **element**: Fields of the object to populate. Values for mandatory fields must be provided. **elementType**: The class name of the object. This must be a POST request. #### URL format http://Simply_url/webservice.php?operation=create&sessionName= [session id]&element=[object]&elementType=[object type] response: A SimplyObject instance representing the new object. ### Retrieve Retrieve an existing entry from the server. retrieve(id: Id): SimplyObject **Request Type**: GET **id**: The ID of the object. **response**: A SimplyObject instance representing the retrieved object. This must be a GET request. #### URL format http://Simply_url/webservice.php?operation=retrieve&session_name= [session id]&id=[object id] ### Update Update an existing entry on the Simply CRM object. update(object: SimplyObject): SimplyObject **Request Type**: POST **object**: The SimplyObject to update. response: A SimplyObject representing the object after the update. This must be a POST request. #### URL format http://Simply_url/webservice.php?operation=update&sessionName= [session id]&element=[object] ### Delete Delete an entry from the server. delete(id:Id): Nothing **Request** **Type**: POST **id**: The Id of the object to be deleted.response: A map with one key status with value ‘successful’ This must be a POST request. #### URL format http://Simply_url/webservice.php?operation=delete&sessionName= [session id]&id=[object id] ### Query The query operation provides a way to query Simply for data. query(queryString : String): \[SimplyObject\] **Request** **Type**: GET **queryString**: The query to process. **response**: A list of maps containing the fields selected. Queries are currently limited to a single object. Joins are not supported. The query always limits its output to 100 records. The client application can use limit operators to get different records. #### Query format select * | <column_list> | <count(*)> from [where ] [order by <column_list>] [limit [, ]]; The column list in the order by clause can have at most two column names. column\_list: comma separated list of field names. object: type name of the object. conditionals: condition operations or in clauses or like clauses separated by ‘and’ or ‘or’ operators these are processed from left to right. The are no grouping that is bracket operators. conditional operators: &lt;, &gt;, &lt;=, &gt;=, =, !=. in clauses: in (). like clauses: like ‘sqlregex’. value list: a comma separated list of values. m, n: integer values to specify the offset and limit respectively. This must be a GET request. Query operation is currently supported for the Entity module only. #### URL format http://Simply_url/webservice.php?operation=query&sessionName= [session id]&query=[query string] ### Sync Sync will return a SyncResult object containing details of changes after modifiedTime. sync(modifiedTime: Timestamp, elementType: String): SyncResult **Request** **Type**: GET modifiedTime: The time of the last synced modification.elementType: This is an optional parameter, if specified the changes for that module after the given time otherwise changes to all user accessible module are returned. **Response** SyncResult { updated:[Object] //List of Objects created or modified. deleted:[Id] //List of Id of objects deleted. lastModifiedTime:Timstamp //time of the latest change. which can used in the next call to the Sync api to get all the latest changes that the client hasn't obtained. } This must be a GET request. #### URL format http://Simply_url/webservice.php?operation=sync&sessionName= [session id]&modifiedTime=[timestamp]&elementType=[elementType] ### Logout Logout from the webservice session, which leaves the webservice session invalid for further use. logout(): Map Request Type: GET Returns a map containing the key ‘message’ with the value ‘successful’. This must be a GET request. #### URL format http://Simply_url/webservice.php?operation=logout&sessionName= [session id] ### List Types List the names of all the Simply objects available through the API. listtypes(): Map Request Type: GET Returns a map containing the key ‘types’ with the value being a list of names of Simply objects. This must be a GET request. #### URL format http://Simply_url/webservice.php?operation=listtypes&sessionName= [session id] ### Describe Get the type information about a given Simply object. describe(elementType: String): DescribeResult Request Type: GET elementType: The type name of the Simply object to describe. Returns a DescribeResult instance. This must be a GET request. #### URL format http://Simply_url/webservice.php?operation=describeobject&sessionName= [session id]&elementType=[elementType] ### Extend Session Extends the current Simply web session to the web service and returns the webservice’s session ID. extendsession(username:String): LoginResult Request Type: POST username: A Simply username. This must be a POST request. #### URL format http://Simply_url/webservice.php?operation=extendsession CRM entities ------------ What follows is the list of CRM entities exposed by the API. | **Name** | **Description** | |---|---| | Calendar | The Calendar module is used to manage to-dos, events and meetings. | | Leads | The Leads module is used to track sales leads. | | Accounts | The Accounts module is used to manage individuals or organizations involved with your business. | | Contacts | The Contacts module is used to manage individuals that may be associated with an account. | | Potentials | The Potentials module is used to manage sales opportunities. | | Products | The Products module is used to manage the products that your organization sells. | | Documents | The Documents module is used to manage the uploaded documents and notes. | | Emails | The Emails module is a email client used to manage your emails. | | HelpDesk | The HelpDesk module is used to track customer issues such as feedback, problems, etc. | | FAQ | The FAQ module is used to manage the frequently asked question posed by your customers. | | Vendors | The Vendors module is used to manage manufacturers and producers. | | PriceBooks | The PriceBook Module is used to manage the pricing of products. | | Quotes | The Quotes module is used to manage product quotes. | | PurchaseOrder | The PurchaseOrder module is used to manage and process the purchase orders. | | SalesOrder | The SalesOrder module is used to manage and process sale orders. | | Invoice | The Invoice module is used to create invoice reports. | | Campaigns | The Campaigns module is used to manage marketing campaigns. | | Events | The Events module is used to manage activities such as calls and meetings. | | Users | The Users module is used to manage the CRM users. | | Groups | User groups in Simply CRM. | | Currency | Currency module lets the administrator define different currencies and set the expected conversion rates with respect to the base currency. These currencies can be used in the Inventory module to support multi-currency. | | DocumentFolders | The DocumentFolders module is used to Groups Documents. | Field Types ----------- ### Picklist A field that can a hold one of a list of values, in which case the map will contain two elements: picklistValues which is a list of possible values, and defaultValue which is the default value for the picklist. | **Name** | **Description** | |---|---| | picklistValues | Represents the list of possible values. | | defaultValue | Specifies which value should be used as the default value for the picklist. | | name | The name of the field type. | ### Reference A field that shows a relation to another object. The field type map will contain another element called refersTo which is an array containing the modules to which the field can point. | **Name** | **Description** | |---|---| | refersTo | An array containing the modules to which the field can point. | | name | The name of the field type. | ### Datetime A string representing the date and time, the format is base on the user’s settings date format. ### Date A string representing a date. The field type map will contain another element called *format*, which specifies the expected format of the field value, based on the user’s date format settings. | **Name** | **Description** | |---|---| | format | The expected format of the field value. | | name | The name of the field type. | ### Text A multiline text field. ### Time A string with the format hh:mm, which is based on the user’s time format settings. ### String A one line text field. ### Boolean A boolean field, which can only have the values *true* or *false*. ### Integer A non-decimal number field. ### Owner A field used to define the owner of the field. This can be a group or an individual user. ### Autogenerated Fields, such as the object’s ID, whose values are generated automatically by Simply. ### Email A field used to store email IDs. ### Phone A field used to store phone numbers. ### URL A field for storing URLs. ### Double A field for for floating point numbers. ### File A field used to add files to Simply. | **Name** | **Description** | |---|---| | maxUploadFileSize | The maximum allowed size allowed for uploading files. | | name | The name of the field type. | ### Password A field used to store passwords. ### Decimal A field used for floating point numbers. ### Skype A field used to store Skype IDs or phone numbers. ### Multipicklist A picklist field where multiple values can be selected. Known issues ------------ Sync does not work on the Users module and non-entity modules like Currency, Groups, etc. Query does not work on non-entity modules like Currency, Groups, etc.

Last updated on Aug 27, 2024

Simply CRM JSON Rest API

Please note: this documents refers to the JSON Rest API of Simply CRM (sometimes popularly) also referred to as the mobile API), not the webservice, which is available at http://crm-base-url/webservice.php and whose operations are described in the article https://support.simply-crm.com/knowledge-base/web-service-api-documentation/ This document also serves as internal documentation, so in case you are missing functionality, feel free to contact us at support@simply-crm.com to ask questions or ask for additional functionalities. Endpoint https://your-instance-ur/modules/Mobile/api.php All operations are POST requests. File Structure - /modules/mobile/ - api.php endpoint for mobile web services. Send all POST requests there. Do not use arguments, but form arguments - index.php HTML page for mobile web service - /modules/mobile/api/ - Request.php is the file containing the Request “model” - /modules/mobile/api/ws/ - contains one file for each operation - Utils.php utilities file, not a proper request How modules work Modules follow the following rules: - if I disable a field in the module settings (I set its “Visibility” checkbox to False), that field is not listed anymore in Describe call - fields for a record are organized in “Blocks” of fields. Each block is represented by an array and has a - Calendar is listed a module, but it’s actually made of 3 modules: Task, Meeting and Call. - Task record IDs have the structure 1xID - Meeting record IDs have the structure 18xID - The tasks module that you see displayed in the frontend is the module internally called ProjectTasks. Important: The module ID’s will vary from CRM instance to CRM instance, as individual customers can have custom modules installed in other order, etc. The below loginAndFethcModules always returns the available modules, incl. what ID they have on your specific CRM instance. We generally refer to a record ID as MODULEIDxRECORDID – ie like 12×525 etc. Also remember that there is difference between a modules name (the internal name we use to reference the module) and its label (the name displayed to the user, who can be using his/her preferred language). Operations Dump of operations - ‘login’ - ‘loginAndFetchModules’ - ‘fetchModuleFilters’ - ‘filterDetailsWithCount’ - ‘fetchAllAlerts’ - ‘alertDetailsWithMessage’ - ‘listModuleRecords’ - ‘fetchRecord’ - ‘fetchRecordWithGrouping’ - ‘fetchRecordsWithGrouping’ - ‘describe’ - ‘saveRecord’ - ‘syncModuleRecords’ - ‘query’ - ‘queryWithGrouping’ - ‘relatedRecordsWithGrouping’ - ‘deleteRecords’ - ‘addRecordComment’ Details of Operations NOTE: Most operations support more parameters than the ones that are needed. Parameters such as action, file and search can be left out and this will only cause server logs to display Notice-level errors. Operations described in this document: - login - loginAndFetchModules - describe - syncModuleRecords - fetchRecord - fetchRecordWithGrouping - fetchRecordsWithGrouping - saveRecord login Note that login is using username which is is a specific field in the CRM (normal users use their email to login, but in practice there is a username also). Params: | Name | Value | |---|---| | _operation | login | | username | username | | password | password | | Response: { "success": true, "result": { "login": { "userid": "1", "session": "fa000f0a6c5a414e62dcc4cbf99175d6", "simply_version": "7.1.0", "mobile_module_version": "1.2.1" } } } loginAndFetchModules It’s used by the mobile web client to display a list of modules to the user after the login is successful. It’s also useful to check if a module is enabled or not. Params: | Name | Value | |---|---| | _operation | loginAndFetchModules | | username | username | | password | password | | Response: { "success": true, "result": { "login": { "userid": "1", "session": "fa000f0a6c5a414e62dcc4cbf99175d6", "simply_version": "7.1.0", "mobile_module_version": "1.2.1" }, "modules": [ { "id": "1", "name": "Calendar", "isEntity": true, "label": "Calendar", "singular": "To Do" }, { "id": "2", "name": "Leads", "isEntity": true, "label": "Leads", "singular": "Lead" }, { "id": "3", "name": "Accounts", "isEntity": true, "label": "Accounts", "singular": "Account" }, { "id": "4", "name": "Contacts", "isEntity": true, "label": "Contacts", "singular": "Contact" }, { "id": "5", "name": "Potentials", "isEntity": true, "label": "Potentials", "singular": "Potential" }, { "id": "6", "name": "Products", "isEntity": true, "label": "Products", "singular": "Product" }, { "id": "7", "name": "Documents", "isEntity": true, "label": "Documents", "singular": "Document" }, { "id": "8", "name": "Emails", "isEntity": true, "label": "Email", "singular": "Email" }, { "id": "9", "name": "HelpDesk", "isEntity": true, "label": "Trouble Tickets", "singular": "Ticket" }, { "id": "10", "name": "Faq", "isEntity": true, "label": "FAQ", "singular": "Faq" }, { "id": "11", "name": "Vendors", "isEntity": true, "label": "Vendors", "singular": "Vendor" }, { "id": "12", "name": "PriceBooks", "isEntity": true, "label": "Price Books", "singular": "PriceBook" }, { "id": "13", "name": "Quotes", "isEntity": true, "label": "Quotes", "singular": "Quote" }, { "id": "14", "name": "PurchaseOrder", "isEntity": true, "label": "Purchase Order", "singular": "PurchaseOrder" }, { "id": "15", "name": "SalesOrder", "isEntity": true, "label": "Sales Order", "singular": "SalesOrder" }, { "id": "16", "name": "Invoice", "isEntity": true, "label": "Invoice", "singular": "Invoice" }, { "id": "17", "name": "Campaigns", "isEntity": true, "label": "Campaigns", "singular": "Campaign" }, { "id": "23", "name": "PBXManager", "isEntity": true, "label": "PBX Manager", "singular": "SINGLE_PBXManager" }, { "id": "24", "name": "ServiceContracts", "isEntity": true, "label": "Service Contracts", "singular": "Service Contract" }, { "id": "25", "name": "Services", "isEntity": true, "label": "Services", "singular": "Service" }, { "id": "26", "name": "Assets", "isEntity": true, "label": "Assets", "singular": "Asset" }, { "id": "27", "name": "ModComments", "isEntity": true, "label": "Comments", "singular": "Comment" }, { "id": "28", "name": "ProjectMilestone", "isEntity": true, "label": "Project Milestones", "singular": "Project Milestone" }, { "id": "29", "name": "ProjectTask", "isEntity": true, "label": "Project Tasks", "singular": "Project Task" }, { "id": "30", "name": "Project", "isEntity": true, "label": "Projects", "singular": "Project" }, { "id": "31", "name": "SMSNotifier", "isEntity": true, "label": "SMSNotifier", "singular": "SMS Info" } ] } } describe Describe queries the API for a specified module and returns its configuration. Custom fields are returned. Parameters: | Name | Value | |---|---| | _operation | describe | | _session | session (from Login) | | module | Module | | | | Allowed values for module: - Calendar - Leads - Accounts - Contacts - HelpDesk - Potentials - Campaigns Example of return result: { "success": true, "result": { "describe": { "label": "Calendar", "name": "Calendar", "createable": true, "updateable": true, "deleteable": true, "retrieveable": true, "fields": [ { "name": "subject", "label": "Subject", "mandatory": true, "type": { "name": "string" }, "nullable": false, "editable": true, "uitype": null }, { "name": "assigned_user_id", "label": "Assigned To", "mandatory": true, "type": { "name": "owner" }, "nullable": false, "editable": true, "default": "0", "uitype": null }, { "name": "date_start", "label": "Start Date & Time", "mandatory": true, "type": { "format": "yyyy-mm-dd", "name": "date" }, "nullable": false, "editable": true, "uitype": null }, { "name": "time_start", "label": "Time Start", "mandatory": false, "type": { "name": "time" }, "nullable": true, "editable": true, "uitype": 252 }, { "name": "time_end", "label": "End Time", "mandatory": false, "type": { "name": "time" }, "nullable": true, "editable": true, "uitype": 252 }, { "name": "due_date", "label": "Due Date", "mandatory": true, "type": { "format": "yyyy-mm-dd", "name": "date" }, "nullable": true, "editable": true, "uitype": null }, { "name": "parent_id", "label": "Related to", "mandatory": false, "type": { "refersTo": [ "Accounts", "HelpDesk", "Leads", "Potentials", "Invoice", "Quotes", "PurchaseOrder", "SalesOrder", "Campaigns" ], "name": "reference" }, "nullable": false, "editable": true, "uitype": null }, { "name": "contact_id", "label": "Contact Name", "mandatory": false, "type": { "refersTo": [ "Contacts" ], "name": "reference" }, "nullable": false, "editable": true, "default": "0", "uitype": null }, { "name": "taskstatus", "label": "Status", "mandatory": true, "type": { "picklistValues": [ { "label": "Not Started", "value": "Not Started" }, { "label": "In Progress", "value": "In Progress" }, { "label": "Completed", "value": "Completed" }, { "label": "Pending Input", "value": "Pending Input" }, { "label": "Deferred", "value": "Deferred" }, { "label": "Planned", "value": "Planned" } ], "defaultValue": "Not Started", "name": "picklist" }, "nullable": true, "editable": true, "uitype": null }, { "name": "eventstatus", "label": "Status", "mandatory": false, "type": { "picklistValues": [ { "label": "Planned", "value": "Planned" }, { "label": "Held", "value": "Held" }, { "label": "Not Held", "value": "Not Held" } ], "defaultValue": "Planned", "name": "picklist" }, "nullable": true, "editable": true, "uitype": null }, { "name": "taskpriority", "label": "Priority", "mandatory": false, "type": { "picklistValues": [ { "label": "High", "value": "High" }, { "label": "Medium", "value": "Medium" }, { "label": "Low", "value": "Low" } ], "defaultValue": "High", "name": "picklist" }, "nullable": true, "editable": true, "uitype": null }, { "name": "sendnotification", "label": "Send Notification", "mandatory": false, "type": { "name": "boolean" }, "nullable": false, "editable": true, "default": "0", "uitype": null }, { "name": "createdtime", "label": "Created Time", "mandatory": false, "type": { "name": "datetime" }, "nullable": false, "editable": false, "uitype": null }, { "name": "modifiedtime", "label": "Modified Time", "mandatory": false, "type": { "name": "datetime" }, "nullable": false, "editable": false, "uitype": null }, { "name": "activitytype", "label": "Activity Type", "mandatory": false, "type": { "picklistValues": [ { "label": "Call", "value": "Call" }, { "label": "Meeting", "value": "Meeting" } ], "defaultValue": "Call", "name": "picklist" }, "nullable": false, "editable": true, "uitype": null }, { "name": "visibility", "label": "Visibility", "mandatory": false, "type": { "picklistValues": [ { "label": "Private", "value": "Private" }, { "label": "Public", "value": "Public" } ], "defaultValue": "Private", "name": "picklist" }, "nullable": false, "editable": true, "default": "all", "uitype": null }, { "name": "description", "label": "Description", "mandatory": false, "type": { "name": "text" }, "nullable": true, "editable": true, "uitype": null }, { "name": "duration_hours", "label": "Duration", "mandatory": false, "type": { "name": "time" }, "nullable": true, "editable": true, "uitype": null }, { "name": "duration_minutes", "label": "Duration Minutes", "mandatory": false, "type": { "picklistValues": [ { "label": "00", "value": "00" }, { "label": "15", "value": "15" }, { "label": "30", "value": "30" }, { "label": "45", "value": "45" } ], "defaultValue": "00", "name": "picklist" }, "nullable": true, "editable": true, "uitype": null }, { "name": "location", "label": "Location", "mandatory": false, "type": { "name": "string" }, "nullable": true, "editable": true, "uitype": null }, { "name": "reminder_time", "label": "Send Reminder", "mandatory": false, "type": { "name": "integer" }, "nullable": false, "editable": true, "uitype": null }, { "name": "recurringtype", "label": "Recurrence", "mandatory": false, "type": { "picklistValues": [ { "label": "--None--", "value": "--None--" }, { "label": "Day(s)", "value": "Daily" }, { "label": "Week(s)", "value": "Weekly" }, { "label": "Month(s)", "value": "Monthly" }, { "label": "Year", "value": "Yearly" } ], "defaultValue": "--None--", "name": "picklist" }, "nullable": true, "editable": true, "uitype": null }, { "name": "notime", "label": "No Time", "mandatory": false, "type": { "name": "boolean" }, "nullable": false, "editable": true, "default": "0", "uitype": null }, { "name": "cf_617", "label": "Telefono da chiamare per chiarimenti", "mandatory": false, "type": { "name": "phone" }, "nullable": true, "editable": true, "uitype": null }, { "name": "id", "label": "activityid", "mandatory": false, "type": { "name": "autogenerated" }, "editable": false, "nullable": false, "default": "", "uitype": null } ], "idPrefix": "1", "isEntity": true, "labelFields": "subject" } } } listModuleRecords List records of the specified module. With no other parameters, it will return all records in the module (as allowed for the currently logged in user per user permissions), but can also be used in combination with either “searchText” (a broad search in all fields) or “searchField” that searches a specific field for contents. searchField accepets input in the format of [“email”,”c”,”username@emaildomain.com”] if you want to search the field named email to verify if it contains (“c”) the string “username@emaildomain.com”. As the “c” will return results that contain the string, this means that a search for “username@emaildomain” would also return records where the email field has the value of username@emaildomain.com. | Name | Value | |---|---| | _operation | listModuleRecords | | _session | session (from Login) | | module | Module | | searchText | [empty, or a text you would like to search for in all fields] | | searchField | [empty, or a specific field and text you would like to search for in a specific field] | | page | | syncModuleRecords Performs a sync of records for specified modules, returning the updated and deleted records since last sync. (Identified by syncToken parameter) IMPORTANT: syncModuleRecords does not display custom fields (apparently) Parameters: | Name | Value | |---|---| | _operation | syncModuleRecords | | _session | session (from Login) | | module | Module | | syncToken | [empty, or the token from previous sync] | | mode | PRIVATE | | page | integer | Allowed values for module: - Calendar - Leads - Accounts - Contacts - HelpDesk - Potentials - Campaigns Allowed values for mode: - PRIVATE - PUBLIC Page can be empty. { "success": true, "result": { "sync": { "nextSyncToken": 1385311551, "deleted": [], "updated": [ { "blocks": [ { "label": "Task Information", "fields": [ { "name": "subject", "value": "Meeting with Lead", "label": "Subject", "uitype": "2" }, { "name": "reminder_time", "value": "0", "label": "Send Reminder", "uitype": "30" }, { "name": "assigned_user_id", "value": { "value": "19x1", "label": "Administrator" }, "label": "Assigned To", "uitype": "53", "type": { "defaultValue": { "value": "19x1", "label": "Administrator" } } }, { "name": "date_start", "value": "2014-01-13", "label": "Start Date & Time", "uitype": "6" }, { "name": "time_end", "value": "10:45", "label": "End Time", "uitype": 252 }, { "name": "time_start", "value": "09:45", "label": "Time Start", "uitype": 252 }, { "name": "due_date", "value": "2014-01-13", "label": "Due Date", "uitype": "23" }, { "name": "recurringtype", "value": "", "label": "Recurrence", "uitype": "16" }, { "name": "parent_id", "value": { "value": "2x37", "label": "Davis Jennifer" }, "label": "Related to", "uitype": "66" }, { "name": "contact_id", "value": { "value": "", "label": "" }, "label": "Contact Name", "uitype": "57" }, { "name": "eventstatus", "value": "Planned", "label": "Status", "uitype": "15" }, { "name": "taskpriority", "value": "High", "label": "Priority", "uitype": "15" }, { "name": "sendnotification", "value": "", "label": "Send Notification", "uitype": "56" }, { "name": "createdtime", "value": "2013-11-18 09:44:20", "label": "Created Time", "uitype": "70" }, { "name": "modifiedtime", "value": "2013-11-18 09:44:20", "label": "Modified Time", "uitype": "70" }, { "name": "activitytype", "value": "Meeting", "label": "Activity Type", "uitype": "15" }, { "name": "duration_hours", "value": "1", "label": "Duration", "uitype": "63" }, { "name": "visibility", "value": "Private", "label": "Visibility", "uitype": "16" }, { "name": "duration_minutes", "value": "0", "label": "Duration Minutes", "uitype": "16" }, { "name": "location", "value": "via dei mille 45, Brescia, Italia", "label": "Location", "uitype": "1" }, { "name": "notime", "value": "0", "label": "No Time", "uitype": "56" } ] }, { "label": "", "fields": [ { "name": "description", "value": "description of meeting with Lead", "label": "Description", "uitype": "19" } ] }, { "label": "Custom Information", "fields": [] } ], "id": "18x1207", "labelFields": [ "subject" ] }, { "blocks": [ { "label": "Task Information", "fields": [ { "name": "subject", "value": "Meeting with Lead", "label": "Subject", "uitype": "2" }, { "name": "reminder_time", "value": "0", "label": "Send Reminder", "uitype": "30" }, { "name": "assigned_user_id", "value": { "value": "19x1", "label": "Administrator" }, "label": "Assigned To", "uitype": "53", "type": { "defaultValue": { "value": "19x1", "label": "Administrator" } } }, { "name": "date_start", "value": "2014-01-12", "label": "Start Date & Time", "uitype": "6" }, { "name": "time_end", "value": "10:45", "label": "End Time", "uitype": 252 }, { "name": "time_start", "value": "09:45", "label": "Time Start", "uitype": 252 }, { "name": "due_date", "value": "2014-01-12", "label": "Due Date", "uitype": "23" }, { "name": "recurringtype", "value": "", "label": "Recurrence", "uitype": "16" }, { "name": "parent_id", "value": { "value": "2x37", "label": "Davis Jennifer" }, "label": "Related to", "uitype": "66" }, { "name": "contact_id", "value": { "value": "", "label": "" }, "label": "Contact Name", "uitype": "57" }, { "name": "eventstatus", "value": "Planned", "label": "Status", "uitype": "15" }, { "name": "taskpriority", "value": "High", "label": "Priority", "uitype": "15" }, { "name": "sendnotification", "value": "", "label": "Send Notification", "uitype": "56" }, { "name": "createdtime", "value": "2013-11-18 09:44:19", "label": "Created Time", "uitype": "70" }, { "name": "modifiedtime", "value": "2013-11-18 09:44:19", "label": "Modified Time", "uitype": "70" }, { "name": "activitytype", "value": "Meeting", "label": "Activity Type", "uitype": "15" }, { "name": "duration_hours", "value": "1", "label": "Duration", "uitype": "63" }, { "name": "visibility", "value": "Private", "label": "Visibility", "uitype": "16" }, { "name": "duration_minutes", "value": "0", "label": "Duration Minutes", "uitype": "16" }, { "name": "location", "value": "via dei mille 45, Brescia, Italia", "label": "Location", "uitype": "1" }, { "name": "notime", "value": "0", "label": "No Time", "uitype": "56" } ] }, { "label": "", "fields": [ { "name": "description", "value": "description of meeting with Lead", "label": "Description", "uitype": "19" } ] }, { "label": "Custom Information", "fields": [] } ], "id": "18x1206", "labelFields": [ "subject" ] } ], "nextPage": 0 } } } fetchRecord Fetches a single record. Fields are laid out in a simple key:value association, and all additional keys (such as uitype, label) are skipped. IMPORTANT: fetchRecord fetches Custom Fields correctly, but does not display a label for them. Parameters: | Name | Value | |---|---| | _operation | fetchRecord | | _session | session (from Login) | | record | module_idXrecord_id | | | Allowed values for module: - Calendar - Leads - Accounts - Contacts - HelpDesk - Potentials Record must be in the form module_idXrecord_id such as 1×1151 { "success": true, "result": { "record": { "subject": "new todo with very long title that in iOS will be cut somewhere!", "assigned_user_id": { "value": "19x1", "label": "Administrator" }, "date_start": "2013-05-27", "time_start": "15:40", "time_end": "", "due_date": "2013-05-27", "parent_id": { "value": "", "label": "" }, "contact_id": { "value": "", "label": "" }, "taskstatus": "Not Started", "eventstatus": "", "taskpriority": "High", "sendnotification": "0", "createdtime": "2013-05-26 15:39:57", "modifiedtime": "2013-05-26 15:39:57", "activitytype": "Task", "visibility": "", "description": "desc", "duration_hours": "", "duration_minutes": "", "location": "", "reminder_time": "", "recurringtype": "", "notime": "0", "cf_617": "", "id": "1x1151" } } } fetchRecordWithGrouping Fetches a single record and returns fields with the complete representation containing uitype, label (translated), value and name. IMPORTANT: fetchRecord fetches Custom Fields and it’s sent in the 3rd “block” of fields. Parameters: | Name | Value | |---|---| | _operation | fetchRecordWithGrouping | | _session | session (from Login) | | record | module_idXrecord_id | | | Record must be in the form module_idXrecord_id such as 1×1151 { "success": true, "result": { "record": { "blocks": [ { "label": "Task Information", "fields": [ { "name": "subject", "value": "new todo with very long title that in iOS will be cut somewhere!", "label": "Subject", "uitype": "2" }, { "name": "reminder_time", "value": "", "label": "Send Reminder", "uitype": "30" }, { "name": "assigned_user_id", "value": { "value": "19x1", "label": "Administrator" }, "label": "Assigned To", "uitype": "53", "type": { "defaultValue": { "value": "19x1", "label": "Administrator" } } }, { "name": "date_start", "value": "2013-05-27", "label": "Start Date & Time", "uitype": "6" }, { "name": "time_end", "value": "", "label": "End Time", "uitype": 252 }, { "name": "time_start", "value": "15:40", "label": "Time Start", "uitype": 252 }, { "name": "due_date", "value": "2013-05-27", "label": "Due Date", "uitype": "23" }, { "name": "recurringtype", "value": "", "label": "Recurrence", "uitype": "16" }, { "name": "parent_id", "value": { "value": "", "label": "" }, "label": "Related to", "uitype": "66" }, { "name": "taskstatus", "value": "Not Started", "label": "Status", "uitype": "15" }, { "name": "contact_id", "value": { "value": "", "label": "" }, "label": "Contact Name", "uitype": "57" }, { "name": "eventstatus", "value": "", "label": "Status", "uitype": "15" }, { "name": "taskpriority", "value": "High", "label": "Priority", "uitype": "15" }, { "name": "sendnotification", "value": "0", "label": "Send Notification", "uitype": "56" }, { "name": "createdtime", "value": "2013-05-26 15:39:57", "label": "Created Time", "uitype": "70" }, { "name": "modifiedtime", "value": "2013-05-26 15:39:57", "label": "Modified Time", "uitype": "70" }, { "name": "activitytype", "value": "Task", "label": "Activity Type", "uitype": "15" }, { "name": "duration_hours", "value": "", "label": "Duration", "uitype": "63" }, { "name": "visibility", "value": "", "label": "Visibility", "uitype": "16" }, { "name": "duration_minutes", "value": "", "label": "Duration Minutes", "uitype": "16" }, { "name": "location", "value": "", "label": "Location", "uitype": "1" }, { "name": "notime", "value": "0", "label": "No Time", "uitype": "56" } ] }, { "label": "", "fields": [ { "name": "description", "value": "desc", "label": "Description", "uitype": "19" } ] }, { "label": "Custom Information", "fields": [ { "name": "cf_617", "value": "", "label": "Telefono da chiamare per chiarimenti", "uitype": "11" } ] } ], "id": "1x1151" } } } fetchRecordsWithGrouping Fetches an array of records and returns fields with the complete representation containing uitype, label (translated), value and name. Custom fields are fetched. IMPORTANT: fetchRecord fetches Custom Fields and it’s sent in the 3rd “block” of fields. Parameters: | Name | Value | |---|---| | _operation | fetchRecordsWithGrouping | | _session | session (from Login) | | ids | [“module_idXrecord_id”,”module_idXrecord_id”] | | alertid | (optional) | | Allowed values for module: - Calendar - Leads - Accounts - Contacts - HelpDesk - Potentials Records must be in the form module_idXrecord_id, such as 1×1151, and the ids parameter should be formatted as a JSON string (["18x1164", "1x1151"]). { "success": true, "result": { "records": [ { "blocks": [ { "label": "Task Information", "fields": [ { "name": "subject", "value": "new todo with very long title that in iOS will be cut somewhere!", "label": "Subject", "uitype": "2" }, { "name": "reminder_time", "value": "", "label": "Send Reminder", "uitype": "30" }, { "name": "assigned_user_id", "value": { "value": "19x1", "label": "Administrator" }, "label": "Assigned To", "uitype": "53", "type": { "defaultValue": { "value": "19x1", "label": "Administrator" } } }, { "name": "date_start", "value": "2013-05-27", "label": "Start Date & Time", "uitype": "6" }, { "name": "time_end", "value": "", "label": "End Time", "uitype": 252 }, { "name": "time_start", "value": "15:40", "label": "Time Start", "uitype": 252 }, { "name": "due_date", "value": "2013-05-27", "label": "Due Date", "uitype": "23" }, { "name": "recurringtype", "value": "", "label": "Recurrence", "uitype": "16" }, { "name": "parent_id", "value": { "value": "", "label": "" }, "label": "Related to", "uitype": "66" }, { "name": "taskstatus", "value": "Not Started", "label": "Status", "uitype": "15" }, { "name": "contact_id", "value": { "value": "", "label": "" }, "label": "Contact Name", "uitype": "57" }, { "name": "eventstatus", "value": "", "label": "Status", "uitype": "15" }, { "name": "taskpriority", "value": "High", "label": "Priority", "uitype": "15" }, { "name": "sendnotification", "value": "0", "label": "Send Notification", "uitype": "56" }, { "name": "createdtime", "value": "2013-05-26 15:39:57", "label": "Created Time", "uitype": "70" }, { "name": "modifiedtime", "value": "2013-05-26 15:39:57", "label": "Modified Time", "uitype": "70" }, { "name": "activitytype", "value": "Task", "label": "Activity Type", "uitype": "15" }, { "name": "duration_hours", "value": "", "label": "Duration", "uitype": "63" }, { "name": "visibility", "value": "", "label": "Visibility", "uitype": "16" }, { "name": "duration_minutes", "value": "", "label": "Duration Minutes", "uitype": "16" }, { "name": "location", "value": "", "label": "Location", "uitype": "1" }, { "name": "notime", "value": "0", "label": "No Time", "uitype": "56" } ] }, { "label": "", "fields": [ { "name": "description", "value": "desc", "label": "Description", "uitype": "19" } ] }, { "label": "Custom Information", "fields": [ { "name": "cf_617", "value": "", "label": "Telefono da chiamare per chiarimenti", "uitype": "11" } ] } ], "id": "1x1151" } ] } } saveRecord Updates or creates a record, depending whether the record id is set or not. Parameters: | Name | Value | |---|---| | _operation | saveRecord | | _session | session (from Login) | | module | Module | | record | module_idXrecord_id | | values | json string | | Allowed values for module: You can use all the modules you get back when you loginAndFetchModules via the API (those are the accessible modules to the currently logged in user). In addition to this, you can also access “Users” which will allow you to create new users directly from the API. Also be aware that some modules – such as CustomQuickCreate and ProcessBar – are mainly used in the Web version of the CRM for UI elements, and thereby not very valuable outside the Web version of Simply CRM. Example modules you will find: - Accounts (Organizations) - Contacts - Tasks - Vendors - SalesOrder - Potentials (Deals) - Products - Services - Projects - ProjectTasks (Tasks) - ProjectMilestones - ModComments (Comments) - Documents - Emails - HelpDesk (Tickets) - Invoice - Calendar Please be aware that the modules can have different ID’s and orders based on what CRM installation you have, so if you want to make a generic solution you should always get the module ID. Example of JSON String to set in the values parameter: { "date_start": "2014-01-18", "due_date": "2014-01-18", "start_time": "14:44", "activitytype": "Call", "location": "Overhoeksplein 2, Amsterdam", "subject": "Call Smith", "assigned_user_id": "19x1", "taskstatus": "Planned", "visibility": "Private" } Note the absence of “id” because we want to create a new record. For setting the assigned user, The id must be in the form of moduleid x entityid. Record must be in the form module_idXrecord_id such as 1x1151. Example of successful response: (basically returns the entire record created) { "success": true, "result": { "record": { "blocks": [ { "label": "Task Information", "fields": [ { "name": "subject", "value": "Call Smith", "label": "Subject", "uitype": "2" }, { "name": "reminder_time", "value": "", "label": "Send Reminder", "uitype": "30" }, { "name": "assigned_user_id", "value": { "value": "19x1", "label": "Administrator" }, "label": "Assigned To", "uitype": "53", "type": { "defaultValue": { "value": "19x1", "label": "Administrator" } } }, { "name": "date_start", "value": "2014-01-18", "label": "Start Date & Time", "uitype": "6" }, { "name": "time_end", "value": "", "label": "End Time", "uitype": 252 }, { "name": "time_start", "value": "", "label": "Time Start", "uitype": 252 }, { "name": "due_date", "value": "2014-01-18", "label": "Due Date", "uitype": "23" }, { "name": "recurringtype", "value": "", "label": "Recurrence", "uitype": "16" }, { "name": "parent_id", "value": { "value": "", "label": "" }, "label": "Related to", "uitype": "66" }, { "name": "taskstatus", "value": "", "label": "Status", "uitype": "15" }, { "name": "contact_id", "value": { "value": "", "label": "" }, "label": "Contact Name", "uitype": "57" }, { "name": "eventstatus", "value": "", "label": "Status", "uitype": "15" }, { "name": "taskpriority", "value": "", "label": "Priority", "uitype": "15" }, { "name": "sendnotification", "value": "0", "label": "Send Notification", "uitype": "56" }, { "name": "createdtime", "value": "2013-11-25 13:43:49", "label": "Created Time", "uitype": "70" }, { "name": "modifiedtime", "value": "2013-11-25 13:43:49", "label": "Modified Time", "uitype": "70" }, { "name": "activitytype", "value": "Call", "label": "Activity Type", "uitype": "15" }, { "name": "duration_hours", "value": "0", "label": "Duration", "uitype": "63" }, { "name": "visibility", "value": "Private", "label": "Visibility", "uitype": "16" }, { "name": "duration_minutes", "value": "", "label": "Duration Minutes", "uitype": "16" }, { "name": "location", "value": "", "label": "Location", "uitype": "1" }, { "name": "notime", "value": "0", "label": "No Time", "uitype": "56" } ] }, { "label": "", "fields": [ { "name": "description", "value": "", "label": "Description", "uitype": "19" } ] }, { "label": "Custom Information", "fields": [ { "name": "cf_617", "value": "", "label": "Telefono da chiamare per chiarimenti", "uitype": "11" } ] } ], "id": "1x1225" } } } "success": true, "result": { "record": { "blocks": [ { "label": "Task Information", "fields": [ { "name": "subject", "value": "Call Smith", "label": "Subject", "uitype": "2" }, { "name": "reminder_time", "value": "", "label": "Send Reminder", "uitype": "30" }, { "name": "assigned_user_id", "value": { "value": "19x1", "label": "Administrator" }, "label": "Assigned To", "uitype": "53", "type": { "defaultValue": { "value": "19x1", "label": "Administrator" } } }, { "name": "date_start", "value": "2014-01-18", "label": "Start Date & Time", "uitype": "6" }, { "name": "time_end", "value": "", "label": "End Time", "uitype": 252 }, { "name": "time_start", "value": "", "label": "Time Start", "uitype": 252 }, { "name": "due_date", "value": "2014-01-18", "label": "Due Date", "uitype": "23" }, { "name": "recurringtype", "value": "", "label": "Recurrence", "uitype": "16" }, { "name": "parent_id", "value": { "value": "", "label": "" }, "label": "Related to", "uitype": "66" }, { "name": "taskstatus", "value": "", "label": "Status", "uitype": "15" }, { "name": "contact_id", "value": { "value": "", "label": "" }, "label": "Contact Name", "uitype": "57" }, { "name": "eventstatus", "value": "", "label": "Status", "uitype": "15" }, { "name": "taskpriority", "value": "", "label": "Priority", "uitype": "15" }, { "name": "sendnotification", "value": "0", "label": "Send Notification", "uitype": "56" }, { "name": "createdtime", "value": "2013-11-25 13:43:49", "label": "Created Time", "uitype": "70" }, { "name": "modifiedtime", "value": "2013-11-25 13:43:49", "label": "Modified Time", "uitype": "70" }, { "name": "activitytype", "value": "Call", "label": "Activity Type", "uitype": "15" }, { "name": "duration_hours", "value": "0", "label": "Duration", "uitype": "63" }, { "name": "visibility", "value": "Private", "label": "Visibility", "uitype": "16" }, { "name": "duration_minutes", "value": "", "label": "Duration Minutes", "uitype": "16" }, { "name": "location", "value": "", "label": "Location", "uitype": "1" }, { "name": "notime", "value": "0", "label": "No Time", "uitype": "56" } ] }, { "label": "", "fields": [ { "name": "description", "value": "", "label": "Description", "uitype": "19" } ] }, { "label": "Custom Information", "fields": [ { "name": "cf_617", "value": "", "label": "Telefono da chiamare per chiarimenti", "uitype": "11" } ] } ], "id": "1x1225" } } } Example of error: { "success": false, "error": { "code": "MANDATORY_FIELDS_MISSING", "message": "assigned_user_id does not have a value" } } Example of creating a new user: | Name | Value | |---|---| | _operation | saveRecord | | _session | session (from Login) | | module | Users | | values | json string | | Here the values JSON string have some required fields, as illustrated below, and here note that the roledid is typically formatted as “H1”, “H2”, etc. You can see the actual role under the roles in your Simply CRM administration settings. { "user_name": "username", "user_password": "thepassword", "confirm_password": "thepassword", "last_name": "lastname", "roleid": "H2", "email1": "user@gdomain.com" } Example of creating a new group: | Name | Value | |---|---| | _operation | saveRecord | | _session | session (from Login) | | module | Groups | | values | json string | | Here the values JSON string have some required fields, as illustrated below, and here note that “members” is a list similarly to how groups are created in the web version of Simply CRM. { "groupname": "Groupname", "description": "Description of group", "members": ["Users:5"] } Module-specific considerations Contacts Contacts have a picture field available, but it can be accessed only through the web interface and its content (e.g. the file name) are not retrieved either by the webservice.php or any operation such as syncModuleRecords. When displaying the fields as grouped, a “block” contains the file information but the array is actually empty, even when a contact picture is uploaded. { "label": "Contact Image Information:", "fields": [] } Documents Documents is be designed to contain files and metadata. Not all data is currently available through the mobile API. HelpDesk (Tickets) Tickets have the possibility to have Comments associated to each, and when retrieving the records there is even a Comments block containing an array. But the array is empty independently from the presence of comments. { "label": "COMMENTS", "fields": [] }

Last updated on Dec 16, 2024