You can import location data directly from your SalesForce Account into MetaLocator. To import your data, click Data, then Import. Choose the Salesforce icon as your Data Source:
Click next to show the SalesForce Connection information. Here you must provide your SalesForce credentials to connect your account.
Once you provide a username, password and security token, click Sign In. This will load the SalesForce Objects available to your account in the Object drop-down box. To choose fields to import, choose the SalesForce object first from the Object drop-down box. That will load the list of SalesForce Fields available from that object in the Fields drop-down box. Choose a desired field and click Add to add it to the Selected Fields. Continue adding fields as needed.
You may encounter connection issues if your password contains XML-reserved characters such as
<
>
&
"
'
Sandbox Accounts
Those requiring access to a SalesForce Sandbox Account must provide the Sandbox Partner WSDL from their SFDC account. Click the Upload WSDL file button which appears after choosing Sandbox from the Salesforce Environment drop-down as shown below:
Similarly, if a specific version of SalesForce is required for items like compound objects contact the helpdesk to have a custom version of the Partner WSDL configured in your account.
Be sure to include basic location information for your records and a field for the name. The data you choose to import should include at a minimum, Name (E.g. location name), Street Address City, State and Postal code.
SalesForce SOQL Queries
MetaLocator can import fields from a single object at a time using the Field Chooser. To create more complex queries, including those with joins from multiple tables, you must author SOQL and add it to the Custom Query tab. The query must return the columns directly in the result, or as within a single relation.
An example SOQL query is provided below:
SELECT Name,ShippingStreet, ShippingCity, ShippingState, ShippingPostalCode FROM Account
This simple SOQL example pulls 5 columns from the Account object. Users commonly include filters in "WHERE" clauses to limit the data, such as in the following example which uses a custom field called "Account_Status":
SELECT Name,ShippingStreet, ShippingCity, ShippingState, ShippingPostalCode FROM Account WHERE Account_Status__c = 'Active'
SalesForce Relations and Relationship Fields
MetaLocator's data importer consumes 2-dimensional data, however; SOQL can produce multi-dimensional data sets, where a single column referenced in the query returns multiple rows as in a one-to-many relationship. In this case, the data is returned with each row in the the "one" side of the relationship repeated for every related row in the relation.
For example:
SELECT Account.Name, Id, (SELECT Contact.LastName FROM Account.Contacts) FROM Account
In this example, the related Contacts object includes multiple contacts for each Account. This causes the Account rows to repeat.
Relationship fields will be appended to end of the data set. The following query will produce the same response as the example above.
SELECT (SELECT Contact.LastName FROM Account.Contacts), Account.Name, Id FROM Account
For very complex transformations involving multiple tables and filters, SOQL may be too limited. In these cases, some customers have used tools like dataloader.io to instead create a CSV from Salesforce and then used our SFTP or CSV Import instead of connecting MetaLocator directly to SalesForce.
Mapping Fields
Once you have either chosen fields or written a custom query, click Next, and the import process will continue as usual. Be sure to appropriately map your SalesForce columns to MetaLocator System columns as provided during the next step in the import process.
Modifying SalesForce Imports
Once a SalesForce import is running, you may want to modify the import rules or schedule. The import is comprised of two elements, the Job and the Configuration.
Modify the Job to edit the:
Username
Password
Token
Execution Schedule
Modify the Import to edit the:
Column mapping
Import Options (E.g. Update Existing & Insert New)
To edit the job, click the processes icon as shown:
Then modify the job parameters as shown:
To modify the query, the job must be recreated as described above.
Invalid or Incomplete Country information
Add a setting to your SalesForce job called clean_country_data with a value of 1 to invoke a process which tries to complete TLD and country data where it is not found. This process occurs automatically when data is imported in the dashboard. MetaLocator looks for empty country fields with a TLD value, and sets the country name based on our internal database of country names. Similarly, if a country is provided, and a TLD is not provided, we look up the TLD by country name. This process should be considered a fallback. Ideally, complete country and TLD data should come directly from SalesForce.
Changing the WSDL Version of an existing Import
When connecting to the Salesforce API, MetaLocator users can choose which SalesForce API version the connection should use. The API version is determined by the WSDL selection.
Existing background jobs may have WSDL options already set. To update an existing SalesForce background import job to a different WSDL, go to the Background jobs in the upper right:
Edit the job by clicking the Job Name or Type,
Clear any value from the wsdl
option if it is displayed:
Provide the value partner.55.wsdl.xml
or partner.50.wsdl.xml
for the partner_wsdl
option.
If the partner_wsdl
is not displayed, add it as shown below:
Save the job and Force it as shown:
You will receive an error or confirmation of success via email.
If you see the following error:
Error. SalesForce said: Element {}item invalid at this location
This is an indication you are using the Enterprise WSDL, when instead the Partner WSDL should be provided.