Map the object fields for the query
When you click Next, Studio moves to the Map tab, which includes:
- Mapper: The Mapper contains the fields you can select and the Value column.
- Data File Preview: The Data File Preview displays a preview of the Excel worksheet where the fields selected from Mapper are mapped.
Any required fields, such as Log Column, are automatically selected.
Mapping fields for a query involves three steps:
- Map the fields.
- Add conditions.
- Preview the results.
Map the fields
- In the Mapper, select the check boxes for the fields you want to include in your script.
To quickly find a field, type it in the Search box. After you select the fields you want, return to the full Mapper by deleting the text in the Search box.
Custom fields are listed in their own section of the Mapper.
Tip: To select all the fields in a group, select the group-level check box.
- Map the fields to the Excel worksheet by doing one of the following:
- On the ribbon, click Auto Map.
- Type the Excel column name that corresponds to each field in the Value column in the Mapper.
- Click Save Data File and save the data file.
Before you run the query, you can set conditions so that only the records with the specified values are returned in the query results.
Add conditions to the query
To define the data that will be downloaded, create a condition.
- On the Map tab, click Condition Builder.
The Condition Builder box opens.
- Select the field.
The default is All Fields.
- In the Field Description box, click the field you want.
- In the Value Type box, choose Fixed Value.
- In the Comparison box, choose an operator from the list.
The list shows only the operators that match the data type.
- In the Value box, type the number or text.
- Choose And or Or if you want to add more conditions.
- Click the Add icon.
- Repeat for any other conditions, and then click OK.
Notes:
To add multiple values, such a Number of Employees > 50 and < 500, use the left bracket on the first value and the right bracket on the last value.
You can nest up to five conditions in the query.
For more information about conditions, see Add a condition.
Preview the Query results
Before you download the data from Salesforce, confirm that the query will return the correct results. If the preview does not look the way you want it to, you can adjust the mapping before you continue to the Run tab.
- Click Preview Run.
- Check the results.
The preview generates a maximum of 100 records.
- Click OK.
- Make any changes you want to the mapping.
- Click the Run tab.
Studio for Salesforce will prompt you to save the data file.
Other mapping commands
- Select All: To automatically select all the fields that are displayed in the Mapper, click Select All.
- Refresh: To reload the fields that are displayed in the Mapper whenever any changes are made to the Salesforce Customer Site content, click Refresh.
- Filter Fields: To control which fields are visible in the Mapper, click Filter Fields, and then click the option that you want.
- Add Sheet: To add new data to the data file and use the same script, click Add Sheet. After you click the Run tab, click Write Headers and then enter the data you want to upload.