/README.md

https://github.com/rrmartins/rhocrm · Markdown · 128 lines · 88 code · 40 blank · 0 comment · 0 complexity · c804089b73bd570a963c49674fda9a44 MD5 · raw file

  1. Rhocrm
  2. ===
  3. Rhocrm is a ruby library containing a collection of the out-of-box [RhoSync](http://rhomobile.com/products/rhosync) applications
  4. for various CRM backends.
  5. With Rhocrm, you can utilize the pre-built set of [RhoSync](http://rhomobile.com/products/rhosync/) applications
  6. for popular CRM backends (SalesForce, Oracle CRM On Demand, Sugar CRM, etc.). Also, this library includes support for writing your own [RhoSync](http://rhomobile.com/products/rhosync/)
  7. CRM applications to extend or customize the default functionality.
  8. ## Setup
  9. Install the 'rhocrm' gem by using the following command:
  10. $ [sudo] gem install rhocrm
  11. ## Usage
  12. The 'rhocrm' command creates CRM-based [RhoSync](http://rhomobile.com/products/rhosync/) applications.
  13. Visit the [RhoSync](http://rhomobile.com/products/rhosync/) website for more information.
  14. ### Generating Standard Application
  15. To create a standard out-of-the-box Rhocrm application use the following command:
  16. $ rhocrm app <app_name> <CRM-backend>
  17. Here, the \<CRM\-backend\> parameter specifies the CRM backend that your application will use.
  18. Currently, the following CRM backends are supported:
  19. - OracleOnDemand (for [Oracle CRM On Demand](http://crmondemand.oracle.com))
  20. - MsDynamics (for [Microsoft Dynamics CRM](http://www.microsoft.com/en-us/dynamics/default.aspx))
  21. - Sugar (for [Sugar CRM](http://http://www.sugarcrm.com/crm/))
  22. The generated Rhocrm application structure will include typical [RhoSync](http://rhomobile.com/products/rhosync/)
  23. files (for example, application.rb and settings.yml). It will also create a special vendor directory `vendor/\<CRM\-backend\>`
  24. containing all support files specific for the corresponding CRM backend.
  25. By default, the Rhocrm application will be generated with four standard source adapters corresponding
  26. to the following CRM objects:
  27. - Account
  28. - Contact
  29. - Lead
  30. - Opportunity
  31. ### Generating CRM Application without pre-built source adapters
  32. In some cases, it is necessary to generate an application without any standard sources.
  33. For this purpose, use the `--bare` option to generate just the application's skeleton.
  34. rhocrm app <app_name> <CRM-backend> --bare
  35. ### Generating CRM source adapters for the Rhocrm application
  36. Once you create your Rhocrm application, you can generate the desired source adapters
  37. based on the CRM objects by typing the following command in your Rhocrm application directory:
  38. rhocrm source <CRM-object-name> <CRM-backend>
  39. Here, \<CRM\-object\-name\> must exactly correspond to the name of the CRM object you're trying to
  40. build the source adapter for.
  41. ## Preparing the Rhocrm Application
  42. ### OracleOnDemand settings
  43. All OracleOnDemand-specific settings are located in the `vendor/oracle_on_demand/settings` directory.
  44. In the file `settings.yml` you'll find the entries that you must customize before running the app.
  45. These are:
  46. - **:oraclecrm_service_url:** <oracle_web_services_integration_url> - substitute the default URL with your OracleOnDemand account URL.
  47. For every source adapter based on CRM object there is a corresponding *'vendor/oracle_on_demand/settings/\<CRM\-object\-name\>.yml'*
  48. file containing the descriptions for the OracleOnDemand CRM object.
  49. Every CRM object file has the following entries:
  50. Query_Fields: hash of the objects's fields
  51. (each field's element has the value
  52. in a form of the hash with the field's options ,
  53. containing the following data):
  54. Label => <val> - display name of the field
  55. Type => <val> - type of the field data
  56. (textinput, textarea, Picklist, id, etc.)
  57. NonQuery_MappingWS_Fields: object's fields that can not be used
  58. in OracleCRM Queries
  59. (however, Oracle returns them in GetMapping API)
  60. StaticPickList: Normally, all picklist fields are queried
  61. for the allowed values using GetPicklistValues API
  62. However, for certain fields OracleCRM API
  63. returns the error 'not a valid picklist'
  64. This entry is a workaround for this error -
  65. fields's picklist values are statically hard-coded here.
  66. ObjectFields: this one specifies a hash of fields
  67. that are actually references to other objects.
  68. For example, AccountName field for Contact object
  69. is really a reference to the corresponding Account object.
  70. For the default generated CRM object adapters, this file is pre-filled with information. However, you can customize it by including or excluding
  71. options. For custom adapters, you need to fill this file with relevant information. List of object's fields, for example, can be obtained
  72. from the Oracle CRM On Demand documentation and then later used to fill the Query_Fields setting. Alternatively, user can customize the adapter and obtain
  73. the list of fields using the GetMapping API.
  74. ### MsDynamics settings
  75. All MsDynamics-specific settings are located in the **'vendor/ms_dynamics/settings'** directory.
  76. In the file *'settings.yml'* you'll find the entries that are necessary to customize before running the app.
  77. These are:
  78. ### Sugar settings
  79. All Sugar-specific settings are located in the **'vendor/sugar/settings'** directory.
  80. In the file *'settings.yml'* you'll find the entries that are necessary to customize before running the app.
  81. These are:
  82. ## Running the Rhocrm Application
  83. Once your Rhocrm application is customized and ready to run, you can start it like any other Rhosync app.
  84. Type the following command in the CRM application's root directory:
  85. rake rhosync:start
  86. ## Meta
  87. Created and maintained by Rhomobile Inc.
  88. Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).