Salesforce Writer: Feature Type Parameters

To access feature type parameters, click the gear icon on a feature type in the workspace. This opens the Feature Type Parameter Editor.

Tip  To always display the editor in FME Workbench, you can select View > Windows > Parameter Editor.

General

All feature types share similar General parameters, which may include Feature Type Name, Reader or Writer information, and Geometry.

In most Writer Feature Type parameter dialogs, you can also control Dynamic Schema Definitions. Some database formats accept Table or Index Qualifier prefixes on the output table feature type.

Important  These parameters apply only to a selected feature type, not to the entire writer. If a feature type parameter listed here conflicts with a writer-level parameter, then the writer parameter will be ignored and this feature type parameter will be used.

Object

Writer Mode

Writer modes determines which database command should be issued for each feature received.

The writer mode is specified at the feature type level only.

Specifying the writer mode on a per-feature basis using the fme_db_operation attribute is not supported.

Insert

The attribute values of each received feature that match a field in the destination Salesforce object schema are written as a new Salesforce record of that type. The ID field is ignored in this mode because IDs must be assigned by Salesforce.

Update

The attribute values of each received feature are used to update existing records on Salesforce. Incoming features must have an attribute that matches the ID field of the target Salesforce object. The records which are updated are determined by the ID field only: fme_where is not supported.

Note  In UPDATE mode, writing attributes with empty values will not update the corresponding record field on Salesforce to a blank value. To blank out values, the Salesforce Bulk API looks for the special value “#N/A”.

UPSERT

This is the default mode. Records are updated or inserted based on the field specified in salesforce_external_id_field_name. Features to be written must have an attribute matching the external ID field name, and the attribute must have a value. The record on Salesforce will be updated if the external ID values match. Otherwise, the record will be created.

Not all fields may be used as the external ID field name. Refer to Salesforce’s document on UPSERTs at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_upsert.htm for more information.

The use of UPSERT is strongly encouraged to prevent the creation of unwanted duplicate records. To this end, UPSERT is the default writer mode. The ID field is ignored if it is not the field specified in salesforce_external_id_field_name.

Tip  Whenever possible, use the UPSERT writer mode instead of INSERT to avoid creating duplicate records when re-running a translation involving the Salesforce Writer. Since Salesforce writes are not transactional, this also makes it safer to retry a partially-successful Salesforce Writer translation.

Delete

Existing database records are selected for deletion using the same technique as in UPDATE mode. Non-ID fields are ignored. Salesforce automatically cascades deletes.

HardDelete

Deletion skips Salesforce’s Recycling Bin, but is otherwise identical to the Delete mode. This mode requires additional permissions on the Salesforce account.

UPSERT Key Field

The external ID field name to use as the key for UPSERT operations.

This parameter is required if the Writer Mode is UPSERT , and ignored otherwise.