Write Data(Upsert) (deprecated)

Operation Name

Write Data(Upsert)

Function Overview

This operation is to insert/update data using the SOAP API upsert() call.

 

upsert() uses an external id (*) custom field index to determine if a new record should be created or if an existing record should be updated.

We recommend that in most cases to prevent many unnecessary duplicate records upsert() should be used instead of create().

(*) External ID needs to be defined beforehand, using the customization feature of Salesforce.

 

You can retrieve the results of each record corresponding to the input data from the output schema.

 

= Remarks =

For details about the API specification used in this operation, refer to the API documentation of the selected version in the connection resource from the following link destination page.

  • "Salesforce Developer Documentation"-(https://developer.salesforce.com/docs)

    • SOAP API Developer's Guide

Data Model

The data model of this component is table model type.

Properties

= Remarks =

For details on use of variables, refer to Variables.

Basic Settings

Item name

Required/Optional

Use of Variables

Description

Remarks

Name

Required

Not Available

Enter a name that is used on the script canvas.

 

Input Data

Required

Not Available

Select a component on the script canvas.

 

Required Settings

Item name

Required/Optional

Use of Variables

Description

Remarks

Destination

Required

Not Available

Select a connection resource.

Add

A new connection resource can be added.

Edit list

Connection resource settings can be edited in > HULFT INTEGRATE > Connections.

 

Table Name

Required

Not Available

Select the name of a table in Salesforce.

 

Sort

Required

Not Available

Sorts the list of items by the selected method.

Check Ascending order
Check Descending order
Label Ascending order
Label Descending order
API Ascending order

(Default)

API Descending order
Type Ascending order
Type Descending order
External ID Ascending order
External ID Descending order
Insertable Ascending order
Insertable Descending order
Updatable Ascending order
Updatable Descending order
Null allow Ascending order
Null allow Descending order

 

Item list

Required

-

Displays the item list of the table on Salesforce selected in Table Name.

Only the items that can be added are displayed.

Item list/Check

Optional

Not Available

Select the checkboxes for the columns that you want to select as Schema definition.

 

Item list/Label

Required

Not Available

Displays the label name of the column of the table selected in Table Name.

 

Item list/API

Required

Not Available

Displays the API name of the column of the table selected in Table Name.

 

Item list/Type

Required

Not Available

Displays the data type of the column of the table selected in Table Name.

 

Item list/External ID

-

-

Displays the external ID setting.

Selected

An external ID exists.

Not selected

An external ID does not exist.

 

Item list/Insertable

-

-

Displays the settings for item insertion.

Selected

Items can be inserted.

Not selected

Items cannot be inserted.

 

Item list/Updatable

-

-

Displays the settings for item updates.

Selected

Items can be updated.

Not selected

Items cannot be updated.

 

Item list/Null allow

-

-

Displays whether to allow setting of a null value.

Selected

Allows setting of a null value.

Not selected

Does not allow setting of a null value.

 

Schema definition

Required

-

Displays a list of columns for the table selected as the schema definition.

 

Schema definition/Update key

Optional

Not Available

Select the checkboxes of the items to be update key items.

Selected

The selected schema definition is an update key.

Not selected

The item is not an update key.

 

Schema definition/Label

Required

Not Available

Displays the label names of the columns for the table selected as the schema definition.

 

Schema definition/API

Required

Not Available

Displays the API names of the columns for the table selected as the schema definition.

 

Schema definition/Type

Required

Not Available

Displays the data types of the columns for the table selected as the schema definition.

 

Schema definition/External ID

-

-

Displays the external ID setting.

Selected

An external ID exists.

Not selected

An external ID does not exist.

 

Schema definition/Insertable

-

-

Displays the settings for item insertion.

Selected

Items can be inserted.

Not selected

Items cannot be inserted.

 

Schema definition/Updatable

-

-

Displays the settings for item updates.

Selected

Items can be updated.

Not selected

Items cannot be updated.

 

Schema definition/Null allow

-

-

Displays whether to allow setting of a null value.

Selected

Allows setting of a null value.

Not selected

Does not allow setting of a null value.

 

Schema definition(External ID)

Optional

-

In the case that relationship items exist in the Schema Definition, set items subject to updating by external key.

By selecting the external key item of the relation counterpart object, it becomes possible to pass data with an established relationship.

Note

Available on API 14.0 or later versions, and cannot be used on API 7.0.

Schema definition(External ID)/Source item API

Required

Not Available

Display the API Name of the row of the relation item of the table specified in Table Name.

 

Schema definition(External ID)/Relationship name

Required

Not Available

Display the relationship name of the row of the relation item of the table specified in Table Name.

 

Schema definition(External ID)/Object API

Optional

Not Available

Select the API Name of the relation counterpart object in the relation item column of the table specified in Table Name.

 

Schema definition(External ID)/Item API for relations

Optional

Not Available

Select the external key item of the relation counterpart object in the relation item column of the table specified in Table Name.

  • If omitted, the ID of the relevant record of the relation counterpart object will be passed.

Property actions

Item name

Description

Remarks

Select

Set items selected in the List item/Check column in Schema definition.

 

Option Settings

Item name

Required/Optional

Use of Variables

Description

Remarks

Column name type

Required

Not Available

Select the display type of the column name, for displaying the schema in mapping.

Label

The label name (item name) defined in Salesforce is displayed.

API

(Default)

The API reference name defined in Salesforce is displayed.

 

Batch size

Required

Available

Specify a batch size for performing the write data operation on Salesforce.

  • The default value is "200".

  • A number of 1 or greater, up to 200, can be set. An error occurs if any number outside of this range is set.

  • Depending on the operating environment, increasing the batch size generally helps improve the performance of the write data operation.

Note

According to the Salesforce connector specifications, if you set a batch size to 200 when writing 10,000 records, the write operation is performed in 50 installments.

Whether or not to get result per rows

Required

Not Available

Specify whether or not to obtain results, after writing to Salesforce.

Get

(Default)

Obtain the results of the write data operation.

Do Not Get

Do not obtain the results of the write data operation.

  • If Get is selected, items specified in the Schema and items showing results can be passed to the subsequent processing as data in Table Model type.

  • Please refer to "Schemas" about the obtained information.

Comment

Item name

Required/Optional

Use of Variables

Description

Remarks

Comment

Optional

Not Available

You can write a short description of this connector.

 

Schemas

Input Schema

The number of columns varies depending on the Schema definition settings.

= Remarks =

For schema structure, refer to Table model type .

Output Schema

Information regarding the results of updating will appear in the column, set in the Schema definition.

(Hereafter shown as "Label/API")

<?xml version="1.0" encoding="UTF-8" ?>
<table>
   <row>
    <column>Label/API set in the Schema definition</column>
       : 
     <column>UpdateResult_ID/update_result_id</column>
     <column>UpdateResult_SuccessFlag/upsert_result_is_success</column>
     <column>UpdateResult_NewCreationFlag/upsert_result_is_created</column>
     <column>UpdateResult_ErrorStatusCode/upsert_result_error_status_code</column>
     <column>UpdateResult_ErrorMessage/upsert_result_error_message</column>
     <column>UpdateResult_RowNumber/upsert_result_row_number</column>

   </row>
   <row>
     : 
   </row>
</table>

Element Name

Column Name(Label/API)

Description

Remarks

row

-

Repeats as many times as the number of data given to the input schema.

  • If Do Not Getis selected in Whether or not to get result per rows, the repetition will be 0 times.

Note

If mismatch data exist, such as that data types do not match, the order of input data and output data will not necessarily match. By specifying UpdateResult_RowNumber/upsert_result_row_number as the order condition, the data can be sorted in accordance to the input data in the subsequent Mapper.

column

UpdateResult_ID/upsert_result_id

Salesforce ID is output.

 

UpdateResult_SuccessFlag/upsert_result_is_success

Success Flag is output.

true

Successfully processed

false

Process failed.

Please check the UpdateResult_ErrorStatusCode/upsert_result_error_status_code as well as UpdateResult_ErrorMessage/upsert_result_error_message.

 

UpdateResult_NewCreationFlag/upsert_result_is_created

Create Flag is output.

true

A record is created.

false

No record is created.

 

UpdateResult_ErrorStatusCode/upsert_result_error_status_code

The status code, returned by the Salesforce API, is output.

  • In the below-mentioned case, the Salesforce connector will output the code and message.

    • SALESFORCE_ADAPTER_ILLEGAL_DATA_TYPE

      When the type of connection resource is API 23.0 or earlier, this is set when the defined item type and input data type do not match. For example, if the item is defined as "double" but a character string is input (not a number).

UpdateResult_ErrorMessage/upsert_result_error_message

The message returned by the Salesforce API is output.

UpdateResult_RowNumber/upsert_result_row_number

Number is output based on the placement of the node within the data given to the input schema.

 

Loading schema in Mapper

The schema is loaded automatically.

= Remarks =

For details, refer to Edit Schema.

Mass data processing

Mass data processing isn't supported.

Transaction

Transaction isn't supported.

Parallel Stream Processing

PSP isn't supported.

Available Component variables

Component Variable Name

Description

Remarks

insert_count

The number of data that was successful in the addition processing is stored.

  • The default value is null.

update_count

The number of data that was successful in the updating processing is stored.

  • The default value is null.

error_count

The number of data that was unsuccessful in the addition/updating processing is stored.

  • The default value is null.

read_count

The number of input data is stored.

  • The default value is null.

server_url

The end point URL after Login is stored.

  • The default value is null.

session_id

The session Id is stored.

  • The default value is null.

message_category

When an error occurs, the category of the message code corresponding to the error is stored.

  • The default value is null.

message_code

When an error occurs, the code of the message code corresponding to the error is stored.

  • The default value is null.

message_level

When an error occurs, the severity of the message code corresponding to the error is stored.

  • The default value is null.

operation_api_exception_code

The ExceptionCode of the occured error, in a case of API error, is stored.

  • The default value is null.

  • For any error other than an API Error, the value is not stored.

operation_error_message

When an error occurs, the error message is stored.

  • The default value is null.

operation_error_trace

When an error occurs, the trace information for the error is stored.

  • The default value is null.

Message codes, exception messages, and limitations

Connector

Message code

Error message

Limitations

Messages and limitations of the Salesforce(deprecated) connector

check

check

check