Salesforce Integration with Nodejs based applications using Canvas

How to use Canvas Signed Request Authentication with web based applications like Nodejs & how to use Canvas LifeCycle Handler Class

Salesforce provides many ways to integrate with external systems like SOAP, Rest, Bulk API, User Interface API and so on. One of useful way to integrate any existing web applications with Salesforce is using Canvas.

For sake of this post, I’m using Nodejs application and complete source code can be found here , on my Github repository. It can be deployed on Heroku easily, however I used my local computer to run canvas. That also proves point that integration is happening via Browser and therefore canvas application can be hosted on premise and not necessarily on DMZ layer.

Step 1 : Create Connected App in Salesforce

Enable OAuth in Connected app and provide any Callback URL. Canvas app does not use callback URL however we DO NEED scope.

Next step would be enabling canvas app itself connected app along with locations where we would be using it.

Continue reading “Salesforce Integration with Nodejs based applications using Canvas”

Mulesoft 4 Transformation – Convert JSON to XML

Dataweave code to convert JSON to XML in Mulesoft 4

We will start creating Mule Project in Anypoint studio and input would be provided by Http Listener.

Make sure MIME type of Http Listener set to application/json, otherwise we will get below error :

Dataweave Error: You called the function ‘Value Selector’ with these arguments …

Mulesoft Project structure below

Mulesoft-Project-Convert-JSON-to-XML
Mulesoft Project – Convert JSON to XML
Continue reading “Mulesoft 4 Transformation – Convert JSON to XML”

Introduction to Mulesoft with Example – Alpharetta Developer Group Meet

Slides and Video from Alpharetta Developer group meet – Loading data in Salesforce using Mulesoft 4

Last week, we organized Salesforce Developer group meet in Alpharetta and topic was Introduction to Mulesoft & Live Demo.

We covered,

If you don’t want to miss fun and learning sessions like these, make sure to join our Salesforce developer group here.

Below is slide from group meet

Defining pipe delimited separator in Mulesoft 3 & 4

How to use Pipe delimiter as separator in Mulesoft 3 and 4

Mulesoft 3

As discussed in previous post, to use pipe operator as separator. Navigate to Reader Configuration of Transformation message component

Reader Configuration in Transform Message - Mulesoft 3
Reader Configuration in Transform Message – Mulesoft 3
Continue reading “Defining pipe delimited separator in Mulesoft 3 & 4”

Use pipe delimited file to upsert record in Mulesoft 3

Use Mulesoft to upsert record in Salesforce using Pipe delimited file

Processing Comma Separated file is out of box but what if text file is delimited using comma.

In this post, we will read Pipe delimited file and upsert record in Salesforce. Instead of upserting record in Salesforce, you can do anything else you want to.

This is how final job will look like :

Continue reading “Use pipe delimited file to upsert record in Mulesoft 3”