Set up CRM2

From Opentaps Wiki

Jump to: navigation, search

Contents


First Steps

First, go to opentaps.com to sign up for opentaps CRM2.

Once you have received your permanent authorization token key by email, reset it

$ curl -X POST 'https://crm2.opentaps.com/admin/reset-token' -d clientDomain= ${yourDomain} -d authToken=${authToken}

Keep your new auth token secret! Someone with this token will be able to access everything in your account.

opentaps 1.x

Setting Up with opentaps in the Cloud

If you are using an opentaps in the Cloud Amazon EC2 instance from an instance which says "crm2", then CRM2 is already pre-loaded for you. Simply edit the file hot-deploy/crm2/config/crm2.properties and populate your settings:

crm2.activities.widget.baseOpentapsUrl = https://your-ec2-instance-ip.compute-1.amazonaws.com
crm2.activities.widget.authToken = your-auth-token-value
crm2.activities.widget.clientDomain = your-domain.com

Then, restart opentaps

$ /etc/init.d/opentaps restart

You should see an activities widget similar to those from Tour of CRM2 in your CRM system.

Setting up for opentaps 1.x

If you are using an older AMI which does not have "crm2" in its name, or if you are running opentaps on your own server, then you will have to get the code for crm2. This is available directly from github at https://github.com/opentaps/opentaps-crm2, and you can check it out with

$ git clone ssh://git@github.com:opentaps/opentaps-crm2.git opentaps-crm2

Then copy it to your hot-deploy directory:

$ cp -r opentaps-crm2/opentaps-1.5/ path-to-opentaps-1.5/hot-deploy/crm2

Out of the box, this code works for opentaps 1.5. If you are using opentaps 1.4 or earlier versions, you will need to replace some of the lines which are for opentaps 1.5 with those for earlier versions. Edit the file src/com/opentaps/crm2/ContactExportService.java and search for "opentaps 1.5" and follow the instructions to comment out and uncomment the appropriate lines.

Next, compile the new module with

$ ant

Add the new module to either opentaps/component-load.xml or hot-deploy/component-load.xml file with

    <load-component component-location="crm2"/>

If you have the opentaps Professional Edition, just uncomment lines between

<!-- Uncomment to use Crm2 application
and
-->

in the following files:

opentaps/crmsfa/webapp/crmsfa/orders/viewOrder.ftl
opentaps/crmsfa/widget/crmsfa/screens/accounts/AccountsScreens.xml
opentaps/crmsfa/widget/crmsfa/screens/contacts/ContactsScreens.xml
opentaps/crmsfa/widget/crmsfa/screens/leads/LeadsScreens.xml
opentaps/crmsfa/widget/crmsfa/screens/orders/OrdersScreens.xml
opentaps/opentaps-common/webapp/common/WEB-INF/common-controller.xml
opentaps/purchasing/webapp/purchasing/order/viewOrder.ftl
opentaps/purchasing/widget/purchasing/screens/order/OrderScreens.xml
opentaps/purchasing/widget/purchasing/screens/supplier/SupplierScreens.xml

If not, download the patch file for crm2 and apply it to your opentaps.

Finally, follow the instructions above to configure your crm2/config/crm2.properties file and restart opentaps.

Exporting Users to CRM2

To export your users to CRM2, run the service exportContactsToCrm2 with the following parameters:

This services uses entity sync. Newly created or updated contacts will be added. If the party has a user_login which has _VIEW permission to CRMSFA or FINANCIALS (through any of his user_login_security_permission_group), his user_login_id will be imported as a user_id without password

This service can be set up to run regularly as a job, so new users are automatically added to CRM2.

Setting up the WordPress Contact Form

  • Copy opentaps_crm2/wordpress/template-crm2-contact.php to your wordpress curent theme directory
  • Modify template-crm2-contact.php to set up your authToken and clientDomain
  • Create new wordpress Page with template-crm2-contact.php template


© Open Source Strategies, Inc. Development of this documentation site is sponsored by Open Source Strategies, Inc.
Help support opentaps with a subscription to this documentation site.