This document provides steps for creating users in Salesforce using Anypoint Studio:
1. Create an empty project in Anypoint Studio and connect the necessary HTTP, Salesforce, DataMapper, and XML to JSON connectors.
2. Configure the HTTP and Salesforce connectors, specifying settings like the listener path and username/password for Salesforce.
3. In the Salesforce connector, select the "Create Single" operation and map the required user fields like LastName, Email, and ProfileId that need to be created in Salesforce.
4. Create a mapping to convert the Salesforce response to JSON and output it as XML. Once complete, the project can be run to create users in Sales
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Mulesoft: Creating users in Salesforce with Anypoint Studio.
1. MuleSoft
Creating users in Salesforce withCreating users in Salesforce with
Anypoint Studio.Anypoint Studio.
By Daniel HenríquezBy Daniel Henríquez
2. First Step
●
Create an empty project in Anypoint Studio.
●
Now we need to use the Transformers and Connectors of this list:
– HTTP
– Salesforce
– DataMapper
– XML to JSON
●
Connect them in the order of the last list.
3. Second Step
●
We need to configure the connectors, first HTTP Connector:
– In the HTTP Connector options, create a listener:
– Go the the Basic Setting and type on path /Salesforce:
– You should see your Http Conector like this:
4. Third Step
●
Configure the Salesforce Connector, in my case i use the Basic Configuration in
Connector Configuration and these are the settings to configure:
– Username
– Password
– Security Token
– Salesforce URL
– I Use Proxy ( NN )
5. Third Step
●
Once that the connector has been created we need to select in Operation the
Create Single option:
– Now in information there's a label named sObject Type so we need to select
the object User of Salesforce in my case there's a label named Usuario but is
the same object User.
– Now we select the Create Object manually of the sObject Field Mappings area
and press the custom button.
6. Third Step
●
Once the custom button has been pressed we need to configure the required fields
to create an user in Salesforce, These are:
– UserRoleID
– LocaleSidKey
– LastName
– LanguageLocaleKey
– Email
– FirstName
– TimeZoneSidKey
– CommunityNickname
– ProfileId
– EmailEncodingKey
– Alias
– Username
●
This is an example of the Ouput XML of the object:
7. Fourth Step
●
Now we need to create a mapping between the Saleforce saveresult and a XML to
convert to JSON:
– First select in Output the Type XML
– Go down and select the radio From Imput and press Copy Structure
– Now press the button Create Mapping
8. Final Step
●
We finish, now we are able to create an user in salesforce:
●
Run the project and open your browser and type:
●
When an user is created in salesforce returns a key like this: