Our Salesforce Consulting Team steps through a simple
MuleSoft Integration
At Girikon, a
Salesforce Consulting Company
we believe Salesforce is the world’s no. 1 cloud platform based on CRM (Customer Relationship Management) capabilities. Early last year Salesforce agreed to acquire MuleSoft for a mutli-million-dollar cash and stock deal. MuleSoft, a software company that provides integration software for connecting applications, data and devices.
Girikon’s Salesforce Consultants specialise in many Salesforce products and after the announcement our consulting team gained certifications in MuleSoft. Girikon is commitment to keeping ahead of the pack with knowledge and certifications for leading technologies.
In this blog we are focusing on Salesforce integration with MuleSoft.
Firstly, we will need a Salesforce developer account by clicking on the following link:
https://developer.salesforce.com/signup
.
Then a MuleSoft account by clicking the following link:
https://anypoint.mulesoft.com/login/signup
.
In this first example we can send a couple of contact records to Salesforce with the help of MuleSoft. For this we have to download any point studio which is a MuleSoft IDE by clicking on this link
https://www.mulesoft.com/lp/dl/studio
.
We are going to use any point studio for this data transfer. First download the any point studio. Then extract the zip file in your directory and the click on the application to install it. After installation is finished click on the any point studio icon it will launch a wizard like shown in the figure below.
Fig: – Launch Wizard of Any point Studio
Click on the launch button after selecting the directory of your workspace. It will then open the any point studio as shown in the figure below.
Fig: – Any point Studio
Open the example project in Any point Studio from Any point Exchange by logging into your MuleSoft account.
Download Import Contacts into Salesforce application. Note: do not run the application.
Login to your Salesforce account.
In the left navigation bar, open My Settings under the Personal Setup heading, click to expand the My Personal Information.
Click Reset My Security Token. Salesforce resets the token and emails.
Open your mail account where the security token is sent and copy the token onto your local clipboard.
Now open your Any point Studio after downloading and opening the application it will look like as shown in the given fig.
Fig: – Any point Studio with application
In your application in Studio, click the Global Elements tab. Double-click the Salesforce SFDC config global element to open its Global Element Properties panel.
In the Security Token field, paste the Salesforce token that you copied from your mail.
Alternatively, configure the global element in the XML Editor.
Change the contents of the Username and Password fields to your account-specific values, then click OK to save your changes.
This application project includes a sample CSV file, contacts.csv, that you can use to view the end-to-end functionality of this application. The CSV file will look like this.
Fig: – contacts.csv
In the Package Explorer, click the src/main/resources folder to expand it, then find the contacts.csv file inside this folder. Double-click the File config tab in the Global Elements tab and set the Working Directory field to point to the src/main/resources folder. In the Package Explorer, right-click the import-contacts-into-salesforce project, then select Run As > Mule Application.
Studio runs the application on the embedded server. After the application runs successfully it will create two contacts records in salesforce which the csv file contains. Open your salesforce account, then navigate to the Contacts tab. It will show you two new entries: John Doe and Jane Doe.
Fig: – Two new contacts created
About Girikon
Are you looking for a Salesforce Integration expert? At Girikon it is where the search ends. Girikon is a Salesforce Consulting Partner and has the required set of tools, skilled resources and technical knowledge to understand the platforms an organisation uses and transforms your existing systems to a truly interoperable solution.
Girikon’s Certified Salesforce Consultants understand the rapid increase of mobile, cloud and social platforms. They are here to assist customers who are left to their own devices to develop a solution for their organization. Our
Salesforce Consulting Services
team made up of Architects, Developers, Business Analysts, QA experts have the required knowledge and are certified to design and delivery integrations to suit your needs.
Our services are cost-effective, and our
mulesoft consultants
will develop a strategy to bring together a quality solution which can be across multiple applications and technology platforms such as Salesforce, Microsoft, Oracle, Abode, SAP etc.
Json parsing using Workbench
-
April 30, 2019
-
Sourabh Goyal
Parsing JSON data from Workbench
Why do we always start a question with“why”? The first question that comes to our mind is “Why we are using Workbench for JSON parsing?”
As a Salesforce Consultant I would also follow up similarly with a few other questions such as “Is it the simplest method of Parsing JSON data?”, and “are there other ways in which we can parse JSON data in workbench”. Over the last 4 years with Girikon in the Salesforce Consulting Services team I will try and answer the questions above through an understanding of the given methods below:
METHOD 1: JSON PARSING THROUGH WORKBENCH VIA SERVER
The JSON file is developed as separate code and therefore the most efficient way to check the dynamic project is through the Workbench JSON data parsing method which will benefit the developer by bypassing the rest of the code meaning there is no chance of changing existing code and messing it up. Using Workbench JSON data parsing method also provides the additional benefits such as time saving which translates to increased efficiencies, less complexity and reduced vulnerability to the written code.
Follow the below steps for using Rest Method through workbench:
1. Before you start it is important to set up an account in Workbench.
https://workbench.developerforce.com/login.php?startUrl=%2Fquery.php.At this point login with your Salesforce account.
2. Go to Utilities -> and select Rest Explorer
3. Select the Http Method as POST.
4. Create an Apex class, for mapping the data to be Posted.
5. Set the URL according to Mapping URL and Method
6. Provide the JSON Data in Request body.
And, check the content type from headers.
OUTPUT from the Rest Method will be as follows:
and a new account record will be created in Account sObject .
METHOD 2: JSON DATA PARSING THROUGH WORKBENCH TO SOBJECTS
1. Go to workbench -> Rest Explorer -> HTTP Method POST
2. Now, set the path of the sObject you want as we have used sObject Account to Parse the JSON data.
3. Provide the JSON Data in Request body.
For example:
This will create an account sObject in your Org.
OUTPUT:
and a new account record will be created in Account sObject.
About Girikon
Girikon is a Salesforce consulting company,based out of Phoenix, Arizona with development centre in Noida, India and offices in Melbourne, Australia. Girikon’s global network of offices in USA, India and Australia, allows Girikon to quickly respond to customer’s requirements with a view to effectively delivering a quality product and service. Girikon has a team of experienced and certified Salesforce Consultants including Architects, Developers, Consultants, and Administrators.
Girikon’s team of dynamic, seasoned and qualified professionals have a vast experience in IT across various business areas, Software/ Product development, design, testing, maintenance and resourcing / staffing options. We believe in developing scalable & simplified solution for our clients.