Salesforce™ Health Care Domain Project | API Integration with Dr. Chrono API
Aug24

Salesforce™ Health Care Domain Project | API Integration with Dr. Chrono API

I have worked on many API integrations of Salesforce to other 3rd parties and here I will be sharing my coding experience with Salesforce to Dr.Chrono API integration. One my end clients requested this plugin/ app to be created in Salesforce which will do the Doctors, Patients and other information syncs between the two platforms. Below image shows “integration mind mapping” used by me. I use it to consider some major aspects while discussing integration approaches for this project. In this post, we will discuss how Dr. Chrono API can be used to integrate Salesforce™ with Salesforce™. But before moving forward let’s discuss the requirement of the project.   Data flow diagram https://docs.google.com/drawings/d/1U5MTgnjEuMOwcsGSX1tuRS6dUlZCWd-d6OPxDS9APbw/edit   App development strategy: https://docs.google.com/drawings/d/1jSAsd0TIVH6pY69Sj35t5N8s9Q3_OMZ2LueejZ-Lk_Q/edit?usp=sharing   The project requirements encurtails following. We have to integrate the dr. chrono API with Salesforce™ and create a plugin exclusively, it is a free Healthcare API and SDK built by developers, for developers. Leverage health data, an EHR, practice management and medical billing platform, beside it Dr.Chrono gets 22 Million API calls per month.   What is Dr. Chrono API? A company that helps people find quality care providers nearby, is using the Dr.Chrono API to integrate patient records into the service. This vastly improves the search experience, as patients are connected with doctors based on their medical history and set of conditions. There API uses  common web-based authentication system. It provides a straightforward way for a provider to grant access to their data to your application.   There are three main steps in the OAuth 2.0 authentication workflow. Redirect the provider to the authorization page. The provider authorizes your application and is redirected back to your web application. Your application exchanges the authorization_code that came with the redirect into a pair of access_token and refresh_token. Step 1: Redirect to Dr. Chrono The first step is redirecting your user to Dr.Chrono, typically with a button labeled “Connect to Dr.Chrono” or “Login with Dr. Chrono”. This is just a link that takes your user to the following URL: https://Dr.Chrono.com/o/authorize/?redirect_uri=REDIRECT_URI_ENCODED&response_type=code&Dr.Chrono_id=Dr.Chrono_ID_ENCODED&scope=SCOPES_ENCODED   Step 2: Token exchange Below code is used to obtain a pair of access token and refresh token like this:   import datetime, pytz, requests if ‘error’ in get_params:    raise ValueError(‘Error authorizing application: %s’ % get_params[error]) response = requests.post(‘https://drchrono.com/o/token/’, data={    ‘code’: get_params[‘code’],    ‘grant_type’: ‘authorization_code’,    ‘redirect_uri’: ‘REDIRECT_URI’,    ‘Dr.Chrono_id’: ‘Dr.Chrono_ID’,    ‘Dr.Chrono_secret’: ‘Dr.Chrono_SECRET’, }) response.raise_for_status() data = response.json() # Save these in your database associated with the user access_token = data[‘access_token’] refresh_token = data[‘refresh_token’] expires_timestamp = datetime.datetime.now(pytz.utc) + datetime.timedelta(seconds=data[‘expires_in’])   Roadblock (1): Refreshing an access token Access tokens only last 10 hours (given in seconds in the ‘expires_in’ key in the token exchange step...

Read More
SALESFORCE LIGHTNING COMMUNITIES
Feb13

SALESFORCE LIGHTNING COMMUNITIES

What if you can connect your customers directly to their business process?  What if you can interact with your favorite vendors? What if you can get all the information needed even through your mobile devices? What if…What if……these if’s are never-ending. Let’s tighten our belts and dive into what exactly LIGHTNING communities are all about. LIGHTNING Communities are generally an online platform that can connect members directly with each other. It enables rich collaboration between employees, customers, partners, suppliers, and distributors. It helps people to interact with relevant content, data and business processes. Like a magic wizard, it has the power of social with mobile participation, trusted security and direct connection to business processes. “It focuses on deep understanding just for people’s sake.” Communities deepen customer relationships and very well understand the rapidly changing needs of customers. With including enterprise security and tight integration with business processes it goes beyond our thinking by adding social collaboration, extensive branding, customization and mobile access. WHAT I CAN DO OUT OF IT??… To gain deeper relationships with customers you can create communities. You can easily empower employees to connect and collaborate according to the business needs. Since it uses Salesforce so you can easily connect any 3rd party system directly to your community. You can create multiple communities according to your business needs. TYPES OF COMMUNITIES SUPPORTED:   Customer Communities It provides collaboration, mobile access, and consistent branding even for large groups. The benefit is that it enables customers to answer questions from other customers. It is an interactive platform where we can connect and quickly get the information needed. Even the support is provided by sales-rep to resolve the issues. This community build trust with customers and security for long-term engagements. Partner Communities With its power of Role-Based security, it ensures a strong bond with the business process. It helps us to segment data which is shared with different members. It ensures collaborative selling between partners. FEATURES OF SALESFORCE COMMUNITIES: Communities provide deep integration into the business process. The key features of it are as follows: Business Process Integration: It helps members to raise cases, sales opportunities or campaigns from within the community. Employees can easily share and access files. It helps to drive more sales by connecting your employees with resellers and distributors. Social Collaboration: People can create small groups and can interact easily with goals according to their interest. One can manage social listening, content, engagement, workflow all in one place. Branding/Customisation: Companies can easily customize their websites according to the look and feel they want for their website. Members are free to meet their needs and requirements. One...

Read More
Journey Builder
Oct15

Journey Builder

Built on ExactTarget’s FUEL platform for the Salesforce ExactTarget Marketing Cloud, Journey Builder will enable marketers to map customer journeys to digital marketing interactions, such as email, mobile, social and Websites, to power personalized customer experiences that dynamically evolve based on consumer or customer engagement. Journey Builder’s user-friendly interface makes it easy to visualize and map the path of each customer’s journey with your brand. Whether your campaigns include online channels such as email and mobile, or an offline channel such as direct mail, Journey Builder enables you to increase campaign performance and drive customer satisfaction. Journey Builder is another system that is built on top of Contact Builder. In the past, when we set up trigger events for clients, they had to be custom-built by the services implementation team. Journey Builder changes that. Rather than requiring these triggers to be custom-built, this system enables clients to set up their own events that trigger on up to four specific trigger activities. As part of their configuration process, clients choose how long their website will wait for a customer to do something before letting his browsing session expire from inactivity. Most of these triggers are sent soon after a customer’s session expires. The types of available triggers include:  Post-Purchase: This event triggers immediately after an order is placed. Abandon Browse: When the customer allows the browsing session to expire, this event triggers within five minutes of the session expiration. Abandon Cart: If the customer allowed the session to expire while objects were still in the shopping cart, this event triggers within five minutes of the session expiration. Affinity Change: If, by the end of the customer’s browsing session, a new attribute/value pair enters into the top first or second affinity slots of the customer’s profile that was not previously in the top five at all, this event triggers within five minutes of the session expiration. Journey Builder for Apps is the first solution that empowers any company to deliver personalized customer journeys directly from mobile apps, creating interactive experiences that drive brand engagement and loyalty. With Journey Builder for Apps, any company can now unleash the power of the world’s #1 CRM platform to seamlessly connect the customer journey across sales, service, marketing and communities. Companies including FitBit, Sony PlayStation, HSN, SkyMall and Luxury Retreats are making the shift from campaign-focused marketing to personalized 1:1 customer journeys to connect with customers in entirely new ways. The Seven Stages of Successful App Journeys To create this relationship, marketers and developers must understand the stages of highly successful app journeys. #1 Discovery Most app journeys start with discovery in some form, such as a friend’s recommendation or...

Read More
Territory Management In Salesforce
Oct05

Territory Management In Salesforce

Territory management is critical to businesses of all size. By aligning sales teams to specific territories (industry, geographic, product-based), companies can make the most of their resources at the lowest cost. Aside from the boost in productivity, businesses are able to increase overall revenue by ensuring that all market segments are covered. Having an informed, data-driven plan in place allows companies to focus on growth and scaling up for the future. In particular, small businesses can benefit from a thorough territory management plan, where resources and budgets are limited. You don’t have to be a large enterprise company to strategize like one. What is a Territory? Represents a flexible collection of accounts and users where the users have at least read access to the accounts, regardless of who owns the accounts. Only available if territory management has been enabled for your organization.  Customizable Forecasting Since Customizable Forecasting is a prerequisite for Territory Management, We should understand this as well. Customizable Forecasting is a flexible solution for estimating how much revenue your organization can generate or how many items your organization can sell. You can set up customizable forecasting to reflect how your organization forecasts its sales. With it, you can forecast on a monthly or quarterly basis, use different dates when applying amounts to forecasts, a forecast based on revenue or quantity or both, and define additional quotas based on product families. Use customizable forecasts to review your forecast and drill down through your forecast amounts to see the opportunities included in your forecast. Override forecast amounts directly from the opportunity or overrides the forecast from the Forecasts tab without notifying users below you in the forecast role hierarchy.  Territory Management Territory management is an account sharing system that grants access to accounts based on the characteristics of the accounts. It enables your company to structure your Salesforce data and users the same way you structure your sales territories. Particularly if your organization has a private sharing model, you may need to grant users access to accounts based on criteria such as postal code, industry, revenue, or a custom field that is relevant to your business. You may also need to generate forecasts for these diverse categories of accounts. Territory management solves these business needs and provides a powerful solution for structuring your users, accounts, and their associated contacts, opportunities, and cases. When thinking about territory management, it’s natural to assume that you need to use the Territory Management feature to model your territory hierarchy and manage your territory assignments. This assumption might be true for some customers in some situations, but all customers should consider this feature one option...

Read More
Cloud For Business
Sep08

Cloud For Business

According to a recent survey of over 300 tech consumers, it was found that 91% of people heard the term “Cloud” along with knowing what exactly cloud is. There were around 6% of people who heard the term but were not aware of what cloud is and only 3% were there who never heard the term “Cloud”. If you are the one who doesn’t know what cloud is then, it’s right time for you to get familiarized with the term.   HOW CLOUD TECHNOLOGY HELP YOUR BUSINESS? Cloud helps you reducing cost, increase your storage, easy to setup and provides worldwide access. Everyone has come across these pros and cons of Cloud but now let’s dive into a different world. Here instead of looking into the extreme details and writing everything, let’s focus on stats. It will help you clear your doubts and will make your understanding better. 42% It helps to access data from anywhere, at any time and on any device. It helps in increasing productivity and allows the exchange of information in a much faster way. 20% Secure storage of data in a central location and away from the office. This percentage is low because we have a single server and multiple users who are using the same server. Your data is with the third party so this is always a matter of concern especially protection of data from viruses and malware. Though there is always a way out so for the same you can opt for customizable spam filtering and take effective measures. 10% Potential to reduce cost. As everything is online so there is no need to install any software for the same. There are many applications which provide us with free cloud usage. One can easily increase memory size and storage capacity in very low prices. It provides an advantage to the buyers too by providing them to pay on a monthly or yearly basis for their plan. It becomes very flexible as it comes with “Pay and Use” model. It charges only for the services you use and one can terminate it anytime without providing any further costs. 5% Less need for servers and other storage hardware. It provides cloud computing to get set up in a just couple of minutes. One can adjust the settings and setup passwords and choose the platform where to use. It reduces the cost of storage as we no longer need any kind of hardware. With the cloud, we don’t need too many servers which make our lives a lot easier. 4% Better Collaboration and Sharing across the workforce. It provides effective communication among the clients...

Read More
Salesforce Web to Lead Integration with Drupal 7
Feb08

Salesforce Web to Lead Integration with Drupal 7

Drupal is a CMS and Salesforce is a CRM. Ever thought to integrate these two platforms and explore new things and uncover the benefits which you get doing this? Salesforce is quite configurable and Drupal has plenty of modules to work upon as you wish. To make them synchronize to work them similar to web-to-lead form you just have to follow these steps: Install module in your Drupal 7 Org.: https://www.drupal.org/project/sfweb2lead_webform 2) Generate web-2-lead form from your Salesforce org. having fields you want to display in your webform. 3) Create a webform or clone the existing one. As you want. For cloning your webform there is a need to install following module: Node Clone: https://www.drupal.org/project/node_clone In order to create new form: Home>>Administration>>Content>>Add Content 4) Add title to your newly created web form. 5) Add components to your webform 6) In order to link it with Salesforce, click the option “Salesforce Web2Lead”. 7) Check the option asking to submit to Salesforce. Also, provide Lead Source for web form. 8) Now map your form fields with that of the Salesforce fields Administration>>Configuration>>Web Services>>Salesforce Webform While mapping fields you will be seeing a mapping table having two columns: Key: Webform fields Value: Salesforce fields NOTE: Enable debugging mode in it and you can see the logs of the data entered If you are integrating with your Sandbox Environment then provide “test.salesforce.com” instead of “www.salesforce.com” 9) To have a look on your Drupal log reports Administration>>Configuration>>Reports>>Recent log messages 10) Now you can check your leads in Salesforce STYLING YOUR WEBFORM After completion of your webform do you want to style it to make it more attractive? As an example let us show label inline of the form instead of displaying it alongside. What you have to do is just to install a new module Compact Form , configure it and you are done. Now go to: Administration>>Configuration>>User Interface Provide your webform id there NOTE: To know your form id you have to just inspect your form and get form id from there. Now this is how our web form looks like after styling: HOW TO INTEGRATE SALESFORCE PICKLIST VALUE WITHIN DRUPAL WEBFORM? It’s always helpful to know somethings extra. Make your form dynamic. For bringing Salesforce Picklist in Drupal 7 here are few steps to follow: 1 Install the module for it. It requires following: Drupal 7 Salesforce Suite 7.x-3.x Webform Behavior weights 2 Configure the module and you are done. 3 Just go to your webform components and add new Component. Choose type as Salesforce Picklist. 4 Choose a picklist present in your Salesforce Object which you want to join with your...

Read More
Salesforce Ant Migration
Sep20

Salesforce Ant Migration

Ant Migration tool is used to Create and Fetch Metadata to and from an organisation.  It’s a  command-line utility by which one can upload and download Metadata components. Benefits Its very useful for creating repetitive deployment or may be a large number of components just by executing a command in an command line interface. Useful for uploading test environment with a lot of configuration settings. Manually creating Fields, Objects may take a huge amount of time when you create them by clicking with the salesforce interface. These fields can be created with one command in the Command line interface and using Package.xml file in which you specify the information about all the fields. The Name of the components we can Deploy or retrieve are as follows: Custom Fields. Objects. Workflow rules. Apex Triggers. Apex Class. Visualforce Pages. Etc. The Whole list is mentioned in this link: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_types_list.htm   Installation Download Force.com migration tool from your salesforce organisation. Go to Setup. Type “Tool” and Click on Force.com Migration tool & Toolkits. Go to the Following Link for downloading Ant: https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_36.0.zip Add the bin directory to your path. Set the ANT_HOME environment variable to the directory where you installed Ant. Set the JAVA_HOME environment variable to the directory where the JDK is installed. Run command in Command line Interface:   “ant -version” to check the version and confirm the installation. Usage Create three Files: Package.xml – Which consists the specifications for the components. Package.xml <?xml version=”1.0″ encoding=”UTF-8″?> <Package xmlns=”http://soap.sforce.com/2006/04/metadata”>    <types>        <members>*</members>        <name>CustomObject</name>    </types>    <version>37.0</version> </Package> Build.properties – Which consists the Credentials of the salesforce Organisation to & from which you want to Upload/Download. Build.properties sf.usernameDownload = Sf.User@Name.com sf.passwordDownload = Password122   sf.usernameUpload = Sf.User@Name.com sf.passwordUpload = aasfde@12131QV4cWJnmdflgBRdXsWznzohG sf.serverurlDownload = https://login.salesforce.com sf.serverurlUpload = https://login.salesforce.com sf.maxPoll = 100 Note: You have to mention Security token at the end of the password of the Org in which you want to Upload the metadata.   Build.xml – This file is used to set the attributes which will be used in the Command line interface such as “Project Name”,”Property File”,”retrieveTarget folder( where Downloaded metadata info will be saved)”,”unpackaged(Package.xml file)”. Build.xml <project name=”ANT Migration” default=”test” basedir=”.” xmlns:sf=”antlib:com.salesforce”>   <property file=”build.properties” /> <property environment=”env” /> <target name=”retrieve”> <mkdir dir=”Retrieve” /> <sf:retrieve username=”${sf.usernameDownload}” password=”${sf.passwordDownload}” serverurl=”${sf.serverurlDownload}” retrieveTarget=”Retrieve” unpackaged=”unpackaged/package.xml” pollWaitMillis=”10000″ maxPoll=”100″ /> </target> <target name=”upload”> <sf:deploy purgeOnDelete=”true” username=”${sf.usernameUpload}” password=”${sf.passwordUpload}” serverurl=”${sf.serverurlUpload}” deployroot=”Retrieve” pollWaitMillis=”10000″ maxPoll=”100″ /> </target> </project> Go to the path where you stored these files and then Run commands as follows: Upload(Which you mentioned in your build.xml file as target) – For uploading components you mentioned in the Package.xml file. Retrieve– For downloading the Components information you mentioned in the package.xml file...

Read More
Learning Salesforce in India
Aug01

Learning Salesforce in India

Its a casual day and some newbie in Salesforce asked me “Is Learning Salesforce in India worth”. Mine and everyone’s first answer would be “Do you have the budget to either fly to a western country or pay USD 2000 fees of Salesforce Training online?” Well that is not the cross question what I replied back with. I thought of giving an elaborative answer and wrote this blog. Here are few points I believe “Why Learning Salesforce in India is worth” Young India: We have 1000s of Salesforce enthusiast every year joining in the Salesforce community and 100s of Salesforce Experts in India. With Salesforce everyone is trying to show off and learn as much as possible. This thinking process of an Indian helps other to jump into the competition. With competition one either fails and learns or succeeded and teach others. Salesforce Community: I can see at least 40+ Salesforce Users and Developers group in India and several new groups coming up every day. In past 2 years there is an almost 300% rise in number of registered groups in India. These communities can definitely help you with learning Salesforce and several Recruiters target for bright minds in these groups. Salesforce in India: Salesforce is taking interest. With new announcements from Salesforce investing in hiring Developers and Experts in India it gives a better opportunity for every newbie/fresher. Thus a reason to Learn Salesforce in India is prominent. I believe in No Pain No Gain. To learn anything you should not expect spoonfeeding instead you should be brave and intelligent enough to go out and search for knowledge. The entire social media, youtube, blogs, trail heads, Quora is filled up with information and learning material. www.ajaydubedi.com Startups Hire Freshers: Several Companies startups like mine(www.cloudanalogy.com) are trying to hire freshers and train them in Salesforce. These companies give awesome opportunity to newbies and experienced upto a certain level to get trained and be productive in Salesforce. Salesforce Consultants and Admins: People who are not from a coding background but good at other areas like communication, consulting Testing, Problem solving and also be part of salesforce. Majority of Salesforce business runs around Admins and Consultants Read my blogs regularly to know about the 7th most important reason.www.ajaydubedi.com   I would request everyone reading this blog to share their experience with different Training institutes in India. Name of Institute, Fees, Time duration and Quality of Training. Submit this detail in the comments and win the following Salesforce development...

Read More
Code Reprository Management
Jul21

Code Reprository Management

This blog is for an Intermediate developer who is planning to do Salesforce backup and code management using Git. Unlike Java Salesforce does not have a code versioning system. I am going to demonstrate how we can use Git and Eclipse(Local code base) to have this code management in place. Step 1 : We have a Requirement to create a new Lead source as Web2. Developer have done some changes based upon a requirement and have marked the ticket #227(Hypothetical) as done in project management tool.Quality Analyst(QA)  got this ticket #277(Hypothetical) .To test in order to test the ticket she created lead and set the value of Lead source as ‘Web2’ as we were told to do so. Screenshot below: Step 2 : QA will ‘retrieve’ code from Sandbox using Eclipse Force.com IDE tool to do the task. Next QA will retrieve the class from sandbox in order to do that go to eclipse click File > New > Force.com Project Now Type a project name then type your organization’s Username and Password and if you have the security token you can add it too in the next field but if you don’t have the security token you can create one from your org or you can whitelist your IP to skip the security token part. Fill the correct details then click Next. Next step is to select the metadata you want to retrieve from the Sandbox and then click OK. You can now see the metadata which you have retrieved in your local system. Question 3 : Describes the steps to ‘commit’ to local repository, what tools did you use?                                                                                  And Question 4 : Describes the steps to ‘push’ to remote  repository,what tools did you use? Solution : We used Eclipse to do this task as well  What we did to implement the logic: Step 1 : First of all we have installed Git plugin for eclipse for deployment and retrieval process. To do so we have followed these following steps: 1.1. In Eclipse(any version), Go to help > install new software. Click on Add New button name the Repository(any) and copy and paste this url in the location field url : http://download.eclipse.org/egit/updates Next Install the available softwares. 1.2. Now go to Window > Perspective > Open Perspective > Other  or Click on perspective link and select Git from the available list. Than click Clone Repository button. 1.3....

Read More
Salesforce For A Graduate
Jul13

Salesforce For A Graduate

This blog is about how we can train, motivate, explain a Graduate fresh out from college about Salesforce. This is a very common challenge every Salesforce Team Leader, Manager or Practice Head like me is facing regularly. Graduates also have several questions while getting into Salesforce platform as a Job. I believe and execute the following steps for any Graduate Student to merge into our Salesforce Team. Knowledge: Information is always good to share. The first step for every graduate should be to learn as much as possible about the Multi-tenant environment, Cloud computing technology. They might have heard or learned about Cloud computing in their college course. Questions like. What is Cloud Computing? Why Move to the Cloud? 10 Benefits of Cloud Computing The Force.com Multitenant Architecture What is CRM? Why do we need CRM tool like Salesforce rather than develop it from scratch using Java or? Net. History: The recent history of software development process teaches us a lot. For a long time applications or software were being developed from basic programming. Salesforce CRM solution beats most of this software development approaches out of the window. Salesforce is a product with an added advantage of tweak and configure. Evolution of Salesforce in itself has been interesting, with all of its releases and addition of new features Salesforce has become a one stop shop. Motivation: Motivation can come from the smallest thing. Let it be a person, ambition, wish or even money.First, the trainer or team lead should be motivated enough and believe in Salesforce advantages over other CRM. We should bring all the motivation we can for these freshers and help them understand why Salesforce is the present and future of CRM industry. Salesforce technology being new to the computer programmers have lot to discover. Several new applications are being developed every day in Salesforce. Career Growth: A Comparative Analysis of career growth in Salesforce vs other technologies like MS Dynamics, Java, Net, Perl etc. would be a good starting point for Salesforce enthusiast. Past few years were good for Salesforce developers and we are sure that future is also going to be great. Several administrators, developers, and consultant have made their career in Salesforce by following the same path. Salesforce: Finally Salesforce itself can be a big motivation. Salesforce as a company have given a lot to this industry. There are several fronts in Salesforce by which one can achieve knowledge and recognition. Following Salesforce products or out of box solutions have performed brilliantly in market. Data.com Work.com Desk.com Appexchange Pardot Communities...

Read More