Category: SOAP

Another Powerful Trailhead module – Event Monitoring

Salesforce introduces Trailhead – a fun way to learn Salesforce. It doesn’t matter whether you are Salesforce Admin or Salesforce developer, there are bunch of modules available for your based on your career path. The more modules you complete, you will get more badges and those badges will be attached to your profile. So you can see yourself going stronger and stronger day by day. That is the primary goal of using Salesforce Trailhead – Make yourselves a better Salesforce Admin or a better Salesforce Developer.To achieve your goal, Salesforce Trailhead team recently introduces three new admin modules –Admin TrailGet Ready for Dreamforce TrailEvent Monitoring moduleOut of these above three modules, the module which really looks very interesting to me is the Event Monitoring module. I immediately jumped into it and completed the same. Once completed, I have realized the power of event monitoring. Monitoring event is so important to a Salesforce Admin. In my daily day to day to work, I normally receive so many requests which now I can answer quickly with the help of event monitoring.Let me tell you what makes this module so interesting.This module consists of three sub modules as shown below –The first sub-module – Get Started with Event Monitoring –This sub-module explains the basic like what is event monitoring, what are different types of events present, use cases where event monitoring should be...

Read More

Use Case 2 – WebSphere Cast Iron Cloud Integration – Fetch CSV File from FTP Server and Insert Data into Salesforce.com

Preface – This post is part of “WebSphere Cast Iron Cloud Integration with Salesforce.com” series.Today I will post how you can use WebSphere Cast Iron for integrating FTP with Salesforce. Toady, in this example, I will fetch a CSV file present in a FTP server, read that file and then create the Salesforce object based on that record. Finally I will send the response also. So let’s not waste time here and get straight into the business.Use Case:Below is the object structure -Below is the CSV File(All_Airports.csv) I would like to read and load from FTP server.Once done, the final requirement is to create Salesforce records based on the data present in the CSV file.Implementation:Before we start implementing the above requirement, let’s create the Endpoints first.Endpoint – FTP:Endpoint – Salesforce:Endpoint – HTTP:Create a default HTTP endpoint with port number 80.Now we will create the Flat File Schema as shown below. This flat file schema will be used to read to CSV file present in the FTP server.So all set. Now we will configure the integration by putting activities inside the Orchestration.Activity# 1: HTTP Receive Request:Below you will find all the configuration details related to Receive Request activity.Activity# 2: FTP Get File: This activity will fetch the CSV file from the FTP Server. The configuration of this activity is displayed below -Activity# 3: Transform Read Flat File:Activity# 4: Salesforce.com Create Objects:In this...

Read More

Salesforce Integration – Comparative study between SOAP and REST

Few days back, one of my team member asked me  – Which one should I use? SOAP or REST? I believe this is a very fundamental question, but definitely a very very important one because it will define your project’s success.If you want to learn more about REST, please have a look at this one – really good starting point – “How I explained REST to my wife?”To know more about Salesforce Integration using SOAP API, please check -Salesforce Integration with SOAP APIWe should not compare SOAP and REST as they can’t be compared directly. The reason why I am telling is that because SOAP is a protocol while REST is an architectural style. People normally used to say any HTTP API that isn’t SOAP, REST and that is why the confusion.The main difference between SOAP and REST is the way of coupling between server and client implementation. A SOAP client works similar like custom desktop application and normally tightly coupled with server. So if any side changes anything, the entire contract will break.Whereas REST client is more like a browser. So it is more generic, loosely coupled and it knows how to use a particular protocol to communicate with server.With the above basic, let me post a comparative study on SOAP Vs REST. I hope this will help you to get a quick overview and also help you to make...

Read More

Salesforce Integration with SOAP API – Part 10 – Delete operation using Java program

Preface – This post is part of “Salesforce Integration with SOAP API” series.In this blog post, I will go through an example where I will use Java program to perform delete operation using Salesforce’s SOAP API. The Syntax is given below -DeleteResult[] = connection.delete(ID[] ids);You should consider the below points before using the delete operation. Note: I have written a helper class ConnectionHelper.java which I am using to connect to Salesforce using Enterprise WSDL. To know more about that, please refer my previous post @ Salesforce Integration with SOAP API – Part 4 – Java program for connecting to Salesforce using SOAP API and Enterprise WSDLBelow is the Java program – DeleteAccount.java where I am deleting an Account record with ID: 0019000000tvEQo.import com.sforce.soap.enterprise.DeleteResult;import com.sforce.soap.enterprise.EnterpriseConnection;import com.sforce.soap.enterprise.Error;import com.sforce.ws.ConnectionException;public class DeleteAccount { private EnterpriseConnection enterpriseConnection; private DeleteAccount(){ setEnterpriseConnection(ConnectionHelper.doConnect()); } public static void main(String[] args) { DeleteAccount deleteAccount = new DeleteAccount(); deleteAccount.doDeleteAccount(new String[]{“0019000000tvEQo”}); } private void doDeleteAccount(String ids[]){ try{ DeleteResult[] deleteResults = getEnterpriseConnection().delete(ids); for(DeleteResult eachDeleteResult : deleteResults){ if(eachDeleteResult.isSuccess()){ System.out.println(“Deleted record id: ” + eachDeleteResult.getId()); }else{ for(Error eachError: eachDeleteResult.getErrors()){ System.out.println(“Error occurred with message: ” + eachError.getMessage()); } } } }catch(ConnectionException e){ e.printStackTrace(); } } public EnterpriseConnection getEnterpriseConnection() { return enterpriseConnection; } public void setEnterpriseConnection(EnterpriseConnection enterpriseConnection) { this.enterpriseConnection = enterpriseConnection; }}It’s super easy!!!. Please provide your feedback....

Read More

Salesforce Integration with SOAP API – Part 9 – Upsert operation using Java program

Preface – This post is part of “Salesforce Integration with SOAP API” series.In today’s post, I will explain how you can do Upsert operation using SOAP API and Java Program. Before that we should know what is so special about Upsert? Upsert will allow you to create a new record or update the existing record. Now I am sure you have this question is mind – “How Salesforce will know that the record is already there in the system?”, right!!!! Good. The answer is that you can pass the custom field which will be used to determine the presence of the existing record. So easy!!!It is always recommended to use upsert() rather that create() because of the obvious reason i.e. upsert() will eliminate the chance of creating duplicate record in the system.Syntax -UpsertResult[] = connection.upsert(String externalIdFieldName, sObject[] sObjects);Important point – Note: I have written a helper class ConnectionHelper.java which I am using to connect to Salesforce using Enterprise WSDL. To know more about that, please refer my previous post @ Salesforce Integration with SOAP API – Part 4 – Java program for connecting to Salesforce using SOAP API and Enterprise WSDLBelow is the Java program – UpsertOperation.javaimport com.sforce.soap.enterprise.EnterpriseConnection;import com.sforce.soap.enterprise.Error;import com.sforce.soap.enterprise.UpsertResult;import com.sforce.soap.enterprise.sobject.Account;import com.sforce.soap.enterprise.sobject.SObject;import com.sforce.ws.ConnectionException;public class UpsertOperation { private EnterpriseConnection enterpriseConnection; private UpsertOperation(){ setEnterpriseConnection(ConnectionHelper.doConnect()); } public static void main(String[] args) { UpsertOperation upsertOperation = new UpsertOperation(); upsertOperation.doUpsertOperation(); } private void doUpsertOperation(){ SObject[] allUpserts = new Account[2]; //Create an Account...

Read More
Loading