Adapter Services
Overview
The following sections describe how to configure adapter services, which you use for webMethods to Salesforce.com communications.
Before you configure Adapter for Salesforce services, you must configure the connections you plan to use with them. For details, see Configuring Adapter Connections.
Before Configuring or Managing Adapter Services
About this task
To prepare to configure or manage an adapter service
Procedure
Configuring Adapter Services
About this task
You can configure adapter services that perform the following operations:
| Operation | For more information, see... |
|---|---|
Handle a large number
of records of a Salesforce object. The service performs the following
operations against a batch of Salesforce object records:
|
Configuring Batch Operation Adapter Services |
| Insert new records into one or multiple Salesforce objects. | Configuring Create Operation Adapter Services |
| Perform a dynamic SOQL query against a Salesforce object. | Configuring Custom Query Operation Adapter Services |
| Delete records from an organization's data. | Configuring Delete Operation Adapter Services |
| Monitor the status and display the results of a batch operation. | Configuring Monitor Batch Operations Adapter Services |
| Perform a query against a Salesforce object to return field values from matching records. | Configuring Query Operation Adapter Services |
| Retrieve field values of specified records of a Salesforce object. Use this operation when you know the IDs of the records from which you want field values. | Configuring Retrieve Operation Adapter Services |
| Update records of one or multiple Salesforce objects. | Configuring Update Operation Adapter Services |
| Perform an upsert operation to either insert new records into or update records of a Salesforce object. | Configuring Upsert Operation Adapter Services |
| Execute the Salesforce.com getServerTimestamp utility. | Configuring Utility Operation Adapter Services |
| Execute the Salesforce.com getSessionId utility. | Configuring Utility Operation Adapter Services |
| Execute the Salesforce.com getUserInfo utility. | Configuring Utility Operation Adapter Services |
| Execute the Salesforce.com resetPassword utility. | Configuring Utility Operation Adapter Services |
| Execute the Salesforce.com sendEmail utility. | Configuring Utility Operation Adapter Services |
| Execute the Salesforce.com sendMassEmail utility. | Configuring Utility Operation Adapter Services |
| Execute the Salesforce.com setPassword utility. | Configuring Utility Operation Adapter Services |
Assigning External IDs to sObject Record Fields
About this task
Each record in an sObject is identified uniquely by an Internal ID that Adapter for Salesforce generates automatically. To create a record in a table which has a reference to a record in another sObject, you can mark fields in an sObject with External IDs. When you assign an External ID to a record field, you can identify that record not only by the Internal ID, but also by the External ID field. You can easily access and refer to the value of a field in an sObject designated as an External ID. The adapter service will show all the External ID fields. Select the desired External ID, and save the service.
For example, as shown in the following screenshot, you can identify uniquely a record in an "Account" sObject by either the automatically generated Internal ID or by designating any custom field, for example, "NYSE_ID", to act as an External ID. When creating an “Opportunity” record for this “Account” record, you would use “NYSE_ID” in place of "Account ID".

Configuring Batch Operation Adapter Services
About this task
- Inserts new records.
- Updates records.
- Inserts and updates records (upsert operation).
- Deletes records.
- Performs a query to find records and return field values from matching records.
The following table shows the input parameters of the adapter service that you configure.
| Input Variable | Description |
|---|---|
| content | Takes an object and maps it to actual data. The data type of the content parameter can be byte array, string, InputStream, or Reader. |
| filePath | String Loads the Salesforce object records from a csv file. |
| encoding |
String
Optional. Indicates the specific encoding for the data that the service passes.
The default value is
UTF-8.
|
The following table shows the output parameters of the adapter service that you configure.
| Output Variable | Description |
|---|---|
| jobId | String The ID of the job created to perform the operation. |
| batchId | String List The ID of the batches of records for which the service returns the results from the executed operation. |
To configure an adapter service using the Batch Operation template
Procedure
Results
Configuring Create Operation Adapter Services
About this task
Use the Create Operation template to configure an adapter service that inserts new records into one or multiple Salesforce objects. For example, you might configure an adapter service that inserts new contacts into the Contact Salesforce object, or a service that inserts new records into both the Contact and Account Salesforce objects. The Create operation wraps the create call of the Salesforce.com Web service API.
The Salesforce.com create call returns a SaveResult object. The adapter service returns the information from the SaveResult object as output.
| Output Variable | Description |
|---|---|
| id | String The ID of a newly inserted record. |
| success |
Boolean Whether the
create call successfully
inserted a record. If
success is:
|
| errors |
String List When
success is
false,
errors provides the error codes
and descriptions of the errors that the
create call encountered.
|
The input signature of the adapter service contains the name of the Salesforce object or objects that you selected as input parameters. For example, when you select the Account object, the input signature contains Account as input parameter. Each object is a Document List that holds the field values for the records to insert. At run time, pass the adapter service one Document within the sobjects Document List for each record you want to insert.
The output signature of the adapter service contains a results Document List. Each Document in the input sobjects Document List maps to an output Document in the results Document List.

To configure an adapter service that uses the Create Operation template
Procedure
Configuring Custom Query Operation Adapter Services
About this task
Use the Custom Query Operation template to create a query service that allows you to configure a dynamic Salesforce Object Query Language (SOQL) statement, part of which you set at run time using input fields. At run time, the service will create the SOQL statement by combining the contents of the input fields and then executing the statement. This is useful when you need the flexibility to set all or part of an SOQL statement at run time instead of at design time.
The Custom Query Operation service performs a query against a Salesforce object to find records and return selected field values from those records.
Also, when you configure a custom query, you must provide all the fields of the parent object and then the fields of the child object.
For example, in the following query statement:
SELECT Account.type,Account.Name, Contact.FirstName, Contact.LastName FROM Contact
Provide all the fields of the parent object which is the
Contact and then provide all the fields of the child
object which are
Account.type,Account.Name, Contact.FirstName,
Contact.LastName.
Ensure that all the fields in the parent object is entered before you enter the fields of the child object.
Input and output parameters for the service are
optional. An input parameter is required only when the SOQL statement contains
the
? placeholder
variable. Each
? in the statement
corresponds to an input parameter. For example, in the following query
statement:
SELECT ?, Account.Name, (SELECT Contact.FirstName, Contact.LastName
FROM Account.Contacts) FROM Account ?
you should configure only two input parameters,
because the statement contains two
? placeholder
variables.
You configure an output parameter only when you want to overwrite the default field name in the output result. For example, in the following query statement:
SELECT Contact.FirstName, Contact.Account.Name FROM Contact
if you do not configure any output parameters, the service will populate the output result with FirstName and Name as the parameters in the output IData. If you want to overwrite the default parameters with FNAME and AccountName, set the output parameters to FNAME and AccountName.
You must specify the input and output parameters of the adapter service at design time. When you configure the service, the input fields will contain the input for the SOQL statement. The output fields will contain the results from the result set. Make sure that the input and output fields correctly match those of the SOQL statement. If there is any mismatch, the service will generate an exception at run time.
Configuring a Custom SOQL Statement
About this task
? placeholder
variable to map part of the SOQL statement to the input field. At design time,
you need to add an input parameter for each
? placeholder
variable in the SOQL statement.
For example, in the following SOQL statement:
SELECT Account.Id, Account.Name, (SELECT Contact.FirstName, Contact.LastName
FROM Account.Contacts) FROM Account where Name IN (‘XXX’)
if you want to pass values for
Account.Id
and the
where condition at
run time, write the following SOQL statement:
SELECT ?, Account.Name, (SELECT Contact.FirstName, Contact.LastName
FROM Account.Contacts) FROM Account ?
In this case, you need to add two input parameters - AccId and whereCondition. When the service executes, specify the following values for the parameters:
-
AccId =
Account.Id -
whereCondition = where Name IN
(
‘XXX’), whereXXXis the actual account name
Configuring a Custom Query Operation Adapter Service
About this task
To configure an adapter service using the Custom Query Operation template
Procedure
Configuring Delete Operation Adapter Services
About this task
Use the Delete Operation template to configure an adapter service that deletes records from your organization's data. For example, you might configure an adapter service that deletes contacts from the Contact Salesforce object. The Delete operation wraps the delete call of the Salesforce.com Web service API.
The input to the adapter service includes an ID String List. At run time, pass the adapter service the ID of each record to delete. Each ID is a String value within the ID String List.
As a response, the Salesforce.com delete call returns a DeleteResult object. The adapter service returns the information from the DeleteResult object as output.
| Output Variable | Description |
|---|---|
| id | String The ID of a deleted record. |
| success | Boolean Whether the delete call successfully deleted a record. |
| errors |
String
List If
success is
false,
errors provides the error codes
and descriptions of the errors that the
delete call encountered.
|
The IDs of the records to delete in the ID String List input parameter map to the output in the results Document List.

To configure an adapter service that uses the Delete Operation template
Procedure
Configuring Monitor Batch Operations Adapter Services
About this task
Use the Monitor Batch Operations template to configure an adapter service that monitors the status and displays the results of the batch operations executed by the adapter’s Batch Operation service.
The input signature of the adapter service contains the values of the jobId and batchId output parameters of the Batch Operation service. For more information about the Batch Operation service, see Configuring Batch Operation Adapter Services.
The following table shows the input parameters of the Monitor Batch adapter service that you configure.
| Input Variable | Description |
|---|---|
| jobId | String The ID of the job created to perform the batch operation. |
| batchId | String List The ID of the batches of records for which the service returns the results from the executed operation. |
| filePath | String Applies for query operation only. Allows you to view the results of a batch query operation as a file. |
The following table shows the output parameters of the adapter service that you configure.
| Output Variable | Description |
|---|---|
| Batch |
Document
List
The list contains the following
parameters:
|
The following screenshot shows the Batch output parameter of the Monitor Batch Operations adapter service.

To configure an adapter service using the Monitor Batch Operations template
Procedure
Configuring Query Operation Adapter Services
About this task
Use the Query Operation template to configure an adapter service that executes a Salesforce Object Query Language (SOQL) query against a Salesforce object, to find records and return selected field values from those records. For example, you might configure an adapter service that queries the Contact Salesforce object to find contacts who have a specific Title and return values for the FirstName, LastName, and Phone fields.
The Query operation wraps the query, queryAll, and queryMore calls of the Salesforce.com Web service API. The query call executes the initial query to retrieve the initial matching records. If the response from the query call indicates that there are additional records to retrieve, the adapter service executes the queryMore call as many times as necessary to retrieve all records. The queryAll call identifies the records that have been deleted because of a merge or delete operation.
At run time when you invoke the service, pass the input parameters to the adapter service if you have specified variables in the WHERE clause. The adapter service generates the query and executes the query.
As a response, the Salesforce.com query and queryMore calls return a QueryResult object, which includes the selected field values of the matching records and a flag indicating whether there are additional matching records to retrieve. The queryAll call returns all existing and deleted records.
The following table describes the output from a Query Operation adapter service:
| Variable | Description |
|---|---|
| results | Document List Each Document in the Document List contains the selected fields for a record that matched the specified query. |

To configure an adapter service that uses the Query Operation template
Procedure
Configuring Retrieve Operation Adapter Services
About this task
Use the Retrieve Operation template to configure an adapter service that retrieves selected fields from records of a Salesforce object. The Retrieve operation wraps the retrieve call of the Salesforce.com Web service API.
The input to the adapter service includes an ID String List. At run time, pass the adapter service the ID of each record to retrieve. Each ID is a String value within the ID String List.
As a response, the Salesforce.com retrieve call returns the objects that contain the field values of the retrieved records.
The following table describes the output from a Retrieve Operation adapter service:
| Variable | Description |
|---|---|
| results |
Document
List Each Document in the Document List contains the selected fields of
the retrieved records.
There is a one-to-one mapping between the IDs of the records specified in the ID input parameter to the output in the results Document List. |
| invalidIds |
String
ListContains the list of invalid IDs.
If the user does not have sufficient privilege or if one or more IDs specified in the input parameter are invalid, the response from the Salesforce.com retrieve() call is null. Adapter for Salesforce cannot retrieve the records for invalid IDs. These invalid IDs are made a part of the invalidIds output parameter. Note: When there are invalid IDs in the
invalidIds output parameter,
the number of records in the
results output parameter will
not match the number of IDs specified in the input signature.
|
The IDs of the records to retrieve in the IDString List input parameter map to the output in the results Document List.

To configure an adapter service that uses the Retrieve Operation template
Procedure
Configuring Update Operation Adapter Services
About this task
Use the Update Operation template to configure an adapter service that updates records of one or multiple Salesforce objects. The update operation wraps the update call of the Salesforce.com Web service API.
As a response, the Salesforce.com update call returns a SaveResult object. The adapter service returns the information from the SaveResult object as output.
| Output Variable | Description |
|---|---|
| id | String The ID of an updated record. |
| success |
Boolean Whether the
update call successfully
updated a record. If
success is:
|
| errors |
String
List When
success is
false,
errors provides the error codes
and descriptions of the errors that the
update call encountered.
|
The input signature of the adapter service contains the name of the Salesforce object or objects that you selected as input parameters. For example, when you select the Account object, the input signature contains Account as input parameter. Each object is a Document List that holds the field values and IDs for the records to update. At run time, pass the adapter service one Document within the sobjects Document List for each record you want to update.
The output signature of the adapter service contains a results Document List. Each Document in the input sobjects Document List maps to an output Document in the results Document List.

To configure an adapter service that uses the Update Operation template
Procedure
Configuring Upsert Operation Adapter Services
About this task
Use the Upsert Operation template to configure an adapter service that inserts records or updates records of a Salesforce object. When attempting to add new records, you can use the upsert operation instead of the create operation to avoid the potential of inserting duplicate records. The upsert operation wraps the upsert call of the Salesforce.com Web service API.
For the upsert operation, you specify the value of a field that the operation uses to determine whether a record already exists. The field must be:
- For standard objects, a field with the idLookup property. This is usually the object's ID, Name field, or both.
- For custom objects, a field with the external ID attribute.
If the record does not already exist, the upsert operation inserts it. If the record does exist, the upsert operation updates it. You cannot create or update the values of the fields, which are auto generated by Salesforce.com.
As a response, the Salesforce.com upsert call returns an UpsertResult object. The adapter service returns the information from the UpsertResult object as output.
| Output Variable | Description |
|---|---|
| created |
Boolean Whether the upsert
operation inserted or updated the specified record. The value of
created is
true if the
upsert operation inserted the record or
false if the
upsert operation updated the record.
|
| id |
String The ID of the created or
updated record when
success is
true. If
success is
false,
id
is null.
|
| success | Boolean Whether the upsert call successfully inserted/updated the record. |
| errors |
String
List If
success is
false,
errors provides the error codes
and descriptions of the errors that the
upsert call encountered.
|
The input signature of the adapter service uses an sobjects Document List, which holds the field values the upsert operation uses. At run time, pass the adapter service one Document within the sobjects Document List for each record on which you want to act.
The output signature of the adapter service contains a results Document List. Each Document in the input sobjects Document List maps to an output Document in the results Document List.

To configure an adapter service that uses the Upsert Operation template
Procedure
Configuring Utility Operation Adapter Services
About this task
Use the Utility Operation template to configure an adapter service that invokes one of the following Salesforce.com utilities:
- getServerTimestamp to retrieve the current Salesforce.com system timestamp.
- getSessionId to obtain a session ID or an access token that you use to implement custom Salesforce.com operations that the adapter does not support. If you use a normal Salesforce.com connection, getSessionId will return a session ID. If you use an OAuth Salesforce.com connection, getSessionId will return an access token.
- getUserInfo to obtain personal information about the currently logged-in user, that is, the user account used for the adapter connection. Your adapter service might obtain this information to use for display purposes.
- resetPassword to change a user's password to a temporary, system-generated value.
- sendEmail to send a single e-mail message.
- sendMassEmail to send multiple e-mail messages.
- setPassword to change the password of a user's password to a specified value.
You select the utility that you want the adapter service to execute. The input and output signatures of the adapter service are based on the inputs and outputs of the selected utility. For more information about utilities and parameters that a utility expects as input or returns as output, see the Force.com Web Services API Developer's Guide.
To configure an adapter service that uses the Utility Operation template
Procedure
Testing Adapter Services
About this task
You can test adapter services using Designer. For more information about testing and debugging services, see the IBM webMethods Service Development Help for your release.
To test an adapter service
Procedure
Viewing Adapter Services
About this task
You use Designer to view adapter services.
To view an adapter service
Procedure
Editing Adapter Services
About this task
To edit an adapter service
Procedure
Deleting Services
About this task
You use Designer to delete adapter services.
To delete a service
Procedure
- Review the steps in Before Configuring or Managing Adapter Services.
- In Designer, expand the package and folder that contain the service you want to delete.
- Right-click the adapter service and click Delete.
Validating Adapter Service Values
About this task
Designer enables Adapter for Salesforce to validate user-defined data for adapter services at design time. You can validate the values for a single adapter service or you can configure Designer to always validate the values for adapter services. Both options could potentially slow your design-time operations.
When you enable data validation for a single adapter service, Designer compares the service values against the resource data that has already been fetched from the selected adapter.
If you select the option to always validate values for adapter services, it will do so for all webMethods WmART-based adapters installed on Integration Server.
For more information about the Adapter Service/Notification Editor and other Designer menu options and toolbar icons, see the IBM webMethods Service Development Help for your release.
Enabling Automatic Validation for a Single Adapter Service
About this task
To enable automatic data validation for a single adapter service
Procedure
Enabling Automatic Validation for All Adapter Services
About this task
To always validate the values for all adapter services
Procedure
- Review the steps in Before Configuring or Managing Adapter Services.
- Start Designer.
- Select the Window > Preferences > webMethods > Service Development > Adapter Service/Notification Editor item.
- Enable the Automatic data validation option.
- Click OK.
Changing the Credentials Associated with an Adapter Service at Run Time
About this task
Adapter for Salesforce allows users to specify an alternate connection or user credentials at run-time to invoke the adapter services.
- Configure the adapter service to use the default connection (with which the service was created) or specify an alternate connection alias, as part of the $connectionNameinput field.
- Execute the adapter service by overriding the default credentials, as part of the input signature for the adapter service. The input signature for the adapter services contains a separate document structure: ‘overrideCredentials', with fields $username and $password, for specifying the username and password to be used for the adapter service execution.
If there are no values specified for the $username and $password fields, the adapter service uses the default connection.
Reloading Adapter Values
About this task
You can enable Adapter for Salesforce to reload and validate user-defined data for adapter services at design time in Designer. You can reload values for a single adapter service or you can configure Designer so it automatically reloads the values for adapter services. Both options could potentially slow your design-time operations.
When you reload adapter values for a single adapter service, Designer compares the service values against the resource data that has already been fetched from the selected adapter.
If you select the option to always reload values for adapter services, it will do so for all webMethods WmART-based adapters installed on Integration Server.
For more information about the Adapter Service/Notification Editor, other menu options, and toolbar icons, see the IBM webMethods Service Development Help for your release.
Reloading Values for a Single Adapter Service
About this task
To reload the adapter values for a single adapter service
Procedure
Reloading Values for All Adapter Services
About this task
To reload the adapter values for all adapter services
Procedure
- Review the steps in Before Configuring or Managing Adapter Services.
- Start Designer.
- Select the Window > Preferences > webMethods > Service Development > Adapter Service/Notification Editor item.
- Enable the Automatic polling of adapter metadata option.
- Click OK.
