Salesforce

Salesforce - Methods (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Salesforce - Methods (Magic xpi 4.13)

The following methods are used to configure the Salesforce connector using Direct Access Methods:

Object attachments are stored in a dedicated table under the same replication database. Attachments are stored in Base64 format. The attachment table is called ib_sfdc_attachments and contains for each attachment record the Object Name, Field Name, and the unique object ID as keys.

The following table lists the methods and parameters that can be used. Parameters in bold are mandatory.

Name

Parameters

Description

Bulk Abort Job method aborts the current bulk operation job. When a job is aborted, no more records are processed. However, some changes to data may have taken place, and are not rolled back.

Job ID

Enter the ID of the job that you want to abort.

Timestamp

Select the variable that will hold the abort operation time stamp.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Bulk Check Job State method checks if all batches in the job have been completed.

Job ID

Enter the ID of the job whose state you want to check.

Wait for Job Completion

Specify whether you want to wait for the completion of the job before you check its state. Select one of the following from the drop-down list:

  • No (default)

  • Yes: If you select this option, there is a 10 second interval between retries.

Batches Status XML

Select the variable that will hold the batches' status in an XML structure.

Job State

Select the variable that will hold the job state.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Bulk Retrieve Job Results method gets the results of all batches in the job.

Job ID

Enter the ID of the job whose results you want to retrieve.

Allow Partial Results

Specify whether you want to allow the retrieval of partial results. Select one of the following from the drop-down list:

  • No (default): If you select this option, the method's first action is to check the job's status. If the job is in progress, an error will be generated.

  • Yes: If you select this option, the method does not check the job status and may return partial results if the job has not been completed.

Results XML

Select the variable that will hold the batches' status in an XML structure.

The results XML can be found here:

<Magic xpi installation>\Runtime\ifclib\salesforce\xsd\BulkResults.xsd

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Bulk Retrieve Query Results method retrieves results from Salesforce in the form of one or more CSV files.

Since version: 4.1

Job ID

Enter the ID of the job whose results you want to retrieve.

Wait for Job Completion

Specify whether you want to wait for the completion of the job before you check its state. Select one of the following from the drop-down list:

  • No (default)

  • Yes: If you select this option, there is a 10 second interval between retries.

Results Directory

Enter the full path to the folder where the results files will be created.

Result File Prefix

Enter the required prefix for the results files.

Number of Results

Receives the number of CSV files that will be created by the operation. Files of up to 1 GB are returned, and there can be up to 15 of these.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Convert Lead method is used to convert one Lead at a time into an Account and Contact, as well as (optionally) an Opportunity.

Lead ID

Enter an ID of the Lead to convert.

Converted Status

Enter a valid Lead Status value for a converted lead.

Account ID (In)

Enter the ID of the Account into which the lead will be merged. Required only when updating an existing account.

Contact ID (In)

Enter the ID of the Contact into which the lead will be merged. Required only when updating an existing contact.

Overwrite Lead Source

Specify whether to overwrite the Lead Source field on the target Contact object. The valid values are Yes and No (default).

Create Opportunity

Specify whether to create an Opportunity during lead conversion. The valid values are Yes and No (default).

Owner ID

Enter the ID of the person who will own any newly created Account, Contact, and Opportunity

Send Notification Email

Specify whether to send a notification email to the owner specified in the owner ID. The valid values are Yes and No (default).

Account ID (Out)

Select the variable that will hold the newly created Account ID.

Contact ID (Out)

Select the variable that will hold the newly created Contact ID.

Opportunity ID

Enter the ID of the Opportunity into which the lead will be merged.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Get Objects List method retrieves a list of available objects for Salesforce organization data.

Objects List XML

Select a variable that will hold the Objects List in an XML structure.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Get Timestamp method retrieves Salesforce timestamps.

Timestamp

Determines the variable that holds the Salesforce timestamp (in XML format).

Click to open the Variables List, and select the required variable.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Merge method merges records of the same object type into one of the records, deleting the others, and re-parenting any related records.

Object Type

Select the object type to be merged. Holding Lead, Contact and Account.

Master Record ID

Enter a record ID that indicates which of the records is the master record that the others are merged into.

Record IDs

Enter the other record IDs, separated by commas, to be merged into the master record. Minimum of one record, maximum of two records.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Metadata CRUD method creates, updates, or deletes metadata.

Operation

The CRUD operation that you want to perform. Select one of the following from the drop-down list:

  • Create (default)

  • Update

  • Delete

  • Upsert Since version: 4.5

Metadata

The XML representation of the metadata. For more information about metadata XMLs, click here.

Result XML

Select the variable that will hold the operation's result in an XML structure.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Metadata Check State method checks the processing status of the metadata's asynchronous methods.

Since Salesforce V32 API, the Deploy metadata and the Retrieve metadata calls are synchronous, making this method obsolete. A call to this method will result in an error.

ID

The ID returned in the asynchronous result XML from one of the asynchronous methods (Metadata Deploy or Metadata Retrieve).

Wait for Completion

Specify whether to wait for the completion of the operation before retrieving its state. Select one of the following from the drop-down list:

  • No (default)

  • Yes: The step will not exit until the metadata operation is complete.

Result XML

Select the variable that will hold the result in an XML structure.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Metadata Deploy method deploys a Salesforce metadata zip file.

Metadata Zip File

The full path and the file name of the deployed metadata zip file.

Ignore Warnings

Specify whether the occurrence of a warning will allow a deployment to complete successfully. Select one of the following from the drop-down list:

  • No (default)

  • Yes

Rollback on Error

Specifies whether any failure causes a complete rollback. Select one of the following from the drop-down list:

  • Yes (default)

  • No

If you select No, actions not containing errors are performed, and errors are returned for the remaining actions. This parameter must be set to Yes if you are deploying to a production organization.

Result XML

Select the variable that will hold the deploy result in an XML structure.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Metadata Retrieve method retrieves a Salesforce metadata zip file.

Metadata API Version

The full path to the API version required for the retrieve request. The API version determines which fields are retrieved for each metadata type.

Metadata Destination Zip File

The full path and file name of the retrieved metadata zip file.

Package Names

A comma delimited list of package names to be retrieved. If you want to retrieve unpackaged components, leave this field blank and instead enter a value in the Manifest XML File field (below).

Manifest XML File

The full path of the manifest package XML file. This is used to retrieve unpackaged components.

Result XML

Select the variable that will hold the retrieve result in an XML structure.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Query by SOQL method lets you send a free Salesforce Object Query Language (SOQL) statement and receive an XML of the query result in return.

Query Type

Determines the type of query that you want to perform.

Select one of the following from the drop-down list:

  • Query (default)

  • Query All

SOQL Statement

Enter the SOQL statement that you want to send.

Store Result In

Determines how the result XML will be stored.

Select one of the following from the drop-down list:

  • Variable (default)

  • File

  • Split Files

Result XML

Click to open the Variables List. Select a variable to hold the operation's result in an XML structure.

This is available only if you select Variable in the Store Result In parameter (above).

File Name

Enter the full path of the file where you want to store the query's result.

This is available only if you select File in the Store Result In parameter (above).

Directory

The full path of the directory holding the split XML results.

Click to open the Expression Editor and enter the directory name.

This is available only if you select Split Files in the Store Result In parameter (above).

Prefix

The prefix used for the split XML files.

Click to open the Expression Editor and enter the prefix.

This is available only if you select Split Files in the Store Result In parameter (above).

Records Per File

The number of records in each split file.

Click to open the Expression Editor and enter the required number of records.

This is available only if you select Split Files in the Store Result In parameter (above).

Number of Splits

The numeric variable where the number of splits created from the result XML will be returned to.

Click to open the Variables List and select the required variable.

This is available only if you select Split Files in the Store Result In parameter (above).

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Replicate All Data method performs a full query on the object and replicates the Salesforce data to the selected local database.

Object Name

Select the Salesforce object name.

Destination DB Resource

Enter the database resource.

This method can handle a Salesforce string of more than 8000 characters only when working with an MSSQL 2005 server or above.

Transaction type

Select the database transaction type. The valid values are Record and Table.

Delete All Records First

Indicate whether you want to delete existing records before insert. The valid values are Yes (default) and No.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Replicate Last Deletes method retrieves the deleted records of an object, based on a Start Date argument and replicating the changes to the local database.

Objects Name

Select the Salesforce object name.

Destination DB Resource

Enter the database resource.

This method can handle a Salesforce string of more than 8000 characters only when working with an MSSQL 2005 server or above.

Transaction Type

Select the database transaction type. The valid values are Record and Table.

Start Date

Enter a date to start replicating the Salesforce changes.

The valid date formats are:

YYYY-MM-DDT00:00:00Z

YYYY-MM-DDT00:00:00.000Z

Last Covered Date

Enter a variable that will hold the last covered date.

Records Retrieved

Determines the variable that will hold the number of records that were retrieved.

Click to open the Variables List, and select the required variable.

Records Deleted

Determines the variable that will hold the actual number of records that were deleted.

Click to open the Variables List, and select the required variable.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Replicate Last Updates method retrieves the updated records of an object, based on a Start Date argument and replicating the changes to the local database.

Objects Name

Select the Salesforce object name.

Destination DB Resource

Enter the database resource.

This method can handle a Salesforce string of more than 8000 characters only when working with an MSSQL 2005 server or above.

Transaction Type

Select the database transaction type. The valid values are Record and Table.

Start Date

Enter a date to start replicating the Salesforce changes.

The valid date formats are:

YYYY-MM-DDT00:00:00Z

YYYY-MM-DDT00:00:00.000Z

Last Covered Date

Enter a variable that will hold the last covered date.

Records Retrieved

Determines the variable that will hold the number of records that were retrieved.

Click to open the Variables List, and select the required variable.

Records Updated

Determines the variable that will hold the actual number of records that were updated.

Click to open the Variables List, and select the required variable.

Records Inserted

Determines the variable that will hold the actual number of records that were inserted.

Click to open the Variables List, and select the required variable.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Update Object Structure method retrieves the most updated Salesforce object and builds an equivalent Create Table SQL statement.

Object Name

Select the Salesforce object name.

Destination DB Resource

Enter the database resource.

Drop Table First

Indicate whether you want to delete the table structure before creating the object structure.

Script File Name

Enter the path to the directory that will hold the database scripts.

Run Script

Indicate whether you want to run the created script.

Error Code

Click to open the Variables List. Select a Variable or User Parameter where the corresponding error code is returned.

Related Topics

How to Use Direct Access Methods

Reference
Attachment 
Attachment