This application uses pre-packaged tools to append data to a message payload and perceptively connect with Salesforce. The example takes a CSV file of new account information, determines which region each account belongs to, appends region information to the payload, then uploads the new accounts to an active Salesforce user account. It uses DataSense and DataMapper to map and transform data, thereby facilitating quick integration with this Software as a Service (SaaS) provider.
The use case upon which this example is based represents a reasonably common requirement to upload new account information into Salesforce. From a CSV file containing information about new accounts (company name, billing address, etc.), a user wishes to use the addresses of the companies to determine to which sales region they belong, then upload all the account details – including sales region – to Salesforce. This example application performs these actions using one Mule application.
Complete the following procedure to create, then run this example in your own instance of Anypoint Studio. Skip ahead to the next section if you prefer to simply examine this example.
To witness end-to-end functionality, you must have an active Salesforce account into which you don't mind inserting a new custom field for "region" and two sample accounts. After this application automatically uploads these accounts, you can manually delete them, and the custom field, in your Salesforce account.
Now click New under the Account Custom Fields & Relationships section.
In Step 2, enter values for your new field as per the table below, then click Next to continue.
Field Label Region Length 50 Field Name Region
In Step 4, check the Account Layout box, then click Save.