Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute types #31

Open
artsyca opened this issue Sep 23, 2019 · 3 comments
Open

Attribute types #31

artsyca opened this issue Sep 23, 2019 · 3 comments

Comments

@artsyca
Copy link

artsyca commented Sep 23, 2019

Strictly speaking we're using Zoho as an alternative data source for models that would typically be stored using ActiveRecord. This plugin has great promise of course but at present it treats all fields like text which is challenging when it comes to formats like dates, it would be helpful to support the various attribute types more organically

@rikas
Copy link
Owner

rikas commented Sep 29, 2019

Can you give an example? Also, if you could provide with information on which types Zoho supports it would be great!

@artsyca
Copy link
Author

artsyca commented Sep 30, 2019

There are several field types available in Zoho CRM, I'll document them here along with associated data types

Field Name (in CRM) Data Type (in API) Example (JSON key/value)
Single Line Single Line "single_line": "Single Line",
Multi-Line (Small - 2000 Characters) Multi Line (Small) "multi_line_small": "Multi Line\\nMulti Line\\nMulti Line",
Multi-Line (Large - 32000 Characters) Multi Line (Large) "multi_line_large": "Multi Line\\nMulti Line\\nMulti Line ...",
Email Email "Email": "[email protected]",
Phone Phone "phone": "5551212",
Pick List Pick List "pick_list": "Option 2",
Multi-Select Multiselect "multi_select": ["Option 1", "Option 2", "Option 3"],
Date Date "date": "2019-09-02",
Date/Time DateTime "date_time": "2019-09-26T12:30:00-04:00",
Number Number "number": 99999,
Auto-Number Auto Number "auto_number": "Prefix1Suffix",
Currency Currency "currency_field": 10000.99,
"$currency_symbol": "$",
Decimal Decimal "decimal": 99.1,
Percent Percent "percent": 88.5,
Long Integer Long Integer "long_integer": "999999999999999999",
Checkbox Boolean "checkbox": true,
URL URL "url": "url.ca",
Lookup Lookup "contact_lookup": {
"name": "Alexandros K",
"id": "3xxxxxxxxxxxxxxxxx2"
},
Formula
User UserLookup "user_lookup_single": {
"name": "Gopi C",
"id": "3xxxxxxxxxxxxxxxxx6"
}
Subform Subform Subform is a peculiar beast in its own right, consisting of an array of the above

There are a couple of other fields too, File Upload and Multi Select Lookup which I'm not quite sure about

@artsyca
Copy link
Author

artsyca commented Sep 30, 2019

Here's an example payload, containing the full response from the API -> https://gist.github.com/artsyca/4b625278a3977f113e35aa3efeb57b72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants