Salesforce Integration and Customization

Stefan BergerBy Stefan Berger 2 Jahren agoNo Comments
Home  /  Tech Corner  /  Salesforce Integration and Customization

In the beginning of November 2015 we switched from our in-house customer relationship management software to Salesforce CRM. Salesforce is a customizable, extendable management software that claims to be easy to administer for any technically advert employee. That makes it possible for our Sales team to design the data model, user interfaces and workflows for their everyday work themselves.  

Data Model and Import

Before the sales managers could start working with Salesforce the existing data stock had to be adapted to the Salesforce data model. Every database table is represented by an object, of which you can create records. Our contacts, partner shops, ongoing acquisitions and other database tables were fit in a few of several hundred existing standard objects.

There are several choices how to insert the exported data from CSV files into the Salesforce database, monitor the progress and inspect the results. The Import Wizard is a web application with all features necessary to read CSV files and insert or update the database.

The Data Loader is a desktop application for Windows with even more features. It has a graphical interface as well as a command line interface and can not only import from CSV files but also export data. Thus it can be scheduled to create database backups regularly in case the built in backup functionally is insufficient. The CSV files, as well as XML files can also be sent to the Bulk REST API, a web service that processes the input files asynchronously and provides endpoints to query the import progress and result. Any REST client or the graphical front end called workbench can be used to create API requests. Several plugins offer additional features for importing into Salesforce. Finally, and the solution we chose is to assign the database migration to a Salesforce partner. figure 1 Figure  1: Import Wizard (Source: http://developer.salesforce.com) figure 2 Figure  2: Data Loader figure 3 Figure  3: Workbench (Source: http://workbench.developerforce.com)

Apex

Apex is a programming language similar to Java. Many events can trigger the execution of Apex code, including data manipulation via the Salesforce REST API. You can also open a HTTP connection to an external web service, which is what we did to synchronize database contents we have in Salesforce and in our own database. For shop descriptions, which are saved in XML format, we wanted to validate the input before saving. Validation rules in Salesforce notify the user about invalid input. However, for XML there is no validation rule available. This is the implementation of our XML validation rule: The method is called from a trigger, before the object is saved. It’s an optional field, so we try to validate only non-empty descriptions. Now when invalid XML is entered into the shop description field, an error message appears and the record remains unchanged. figure 4 The Salesforce development environment also supports unit tests. Annotations mark classes and methods as tests so they can be executed to validate a deployment. The developer console shows code coverage statistics. figure 5

Documentation and Community

There are step-by-step guides for example for data imports and creating Apex triggers. The Apex reference contains descriptions for all available classes and methods in a similar structure like Javadoc. There are tutorials in different difficulty levels at https://developer.salesforce.com/trailhead and several discussion forums to post your questions to.
Category:
  Tech Corner
this post was shared 0 times
 000
Stefan Berger
About

 Stefan Berger

  (1 articles)

Stefan Berger joined Visual Meta in 2012. In the backend development team he is responsible for marketing statistics. Furthermore he is focusing on topics of the sales department as well as the finance department.

Leave a Reply

Your email address will not be published.