TIBCO Scribe® Online Connector For Salesforce
Use the TIBCO Scribe® Online Connector for Salesforce to replicate or integrate Salesforce Contact, Account, and Order data into other database or reporting systems.
Possible use cases for the Connector for Salesforce include:
- Integrate leads and contacts in Salesforce into your marketing software and execute email campaigns.
- Integrate webinar attendee data into your Salesforce database.
Connector Specifications
This Connector supports Salesforce API Versions 37 through 51.
Supported | |
---|---|
Agent Types |
|
Connect on-premise | X |
Connect cloud | X |
Data Replication Apps |
|
Source | X |
Target | |
On Schedule Apps |
|
Source | X |
Target | X |
On Event Apps |
|
Source | X |
Target | X |
Flows |
|
Integration | X |
Request-Reply | X |
Message | X |
Setup Considerations
Salesforce Organization
To have the Expense, ExpenseReport, ExpenseReportEntry entities enabled, Field Service Lightning functionality must be activated in the Salesforce organization.
Salesforce User Account
Use an existing Salesforce account or request a trial account from www.salesforce.com. For information about configuration, see your Salesforce administrator.
Configure the account to use either:
- A trusted IP address
- A security token
Configure API settings:
- Developer Salesforce accounts have Bulk API enabled by default.
- Trial Salesforce accounts have Bulk API disabled by default.
Make sure that Bulk API is set correctly for your needs. See Bulk API vs Web Services API.
API Usage Limits
Salesforce limits the number of API calls in any 24-hour period for every Salesforce organization.
If you are an administrative user, you can view the number of API requests your organization has used in the last 24 hours, as follows:
- From the Salesforce User menu, select Setup. The Setup menu displays on the left side of the page.
- Select Administer > Company Profile > Company Information.
- The API Requests, Last 24 Hours field displays the current number of API requests along with the maximum available to your organization.
Bulk API vs Web Services API
There are two methods for integrating data into or replicating data from Salesforce: Bulk API and Web Services API. While the Bulk API is slower, this method does use fewer API calls than the Web Services API.
- Salesforce Bulk API is optimized to load large amounts of data with a minimal number of API calls. The Bulk API can process up to 10,000 records in a batch and up to 2000 batches per 24-hour period.
Verify bulk API is also enabled in Salesforce.
- The Web Services API processes sets of 200 records at a time.
For example, if you select the default batch size of 2000 records, for each batch:
- The Bulk API uses at least three API calls, one to start, one to run, and one to end the batch. For this example, the Bulk API would use only three API calls.
- The Web Services API creates 10 sets of 200 records each, which uses at least 12 API calls. One call to start, one for each 200 record set, and one to end the process.
Note: If you constantly integrate or replicate large amounts of data, you may want to test both methods to determine which one works best for your site.
Due to unpredictable Salesforce limits, you may receive errors from Salesforce when you try to use either the Bulk API or Batch Processing. In these cases, you must use the non-batch method to integrate your data.
Selecting An Agent Type For Salesforce
Refer to TIBCO Cloud™ Integration - Connect Agents for information on available agent types and how to select the best agent for your app.
Authentication
This connector supports the following authentication methods:
- User Credentials.
- OAuth - Supports Single Sign-on and Multi-factor authentication.
OAuth Authentication
To use OAuth Authentication, a Connected App in Salesforce is required. You can use the TIBCO OAuth App or you can create a new Connected OAuth App in Salesforce. To create a new Connected OAuth App, be sure to enable the following:
- Enable the OAuth Settings checkbox
- Callback URL — For the TIBCO Cloud™ Integration - Connect production environments, use https://online.scribesoft.com/OAuthAuthorizationResponse.aspx and for the Sandbox environment, use https://sandbox.scribesoft.com/OAuthAuthorizationResponse.aspx
-
Enable the Require Secret for Web Server Flow checkbox
-
Enable the Require Secret for Refresh Token Flow checkbox
-
Set Refresh Token Policy as Refresh Token is valid until revoked
Once the app is created, you can find Client Id and Client Secret under the API>Enable OAuth Settings section.
A maximum of four connections can be configured to a single Salesforce Connected app because each Connected app only supports four active Access/Refresh token pairs. If you exceed four separate connections, the Access/Refresh Token pairs are revoked as the active connections go beyond four even though the Refresh Token Policy for the app is set to Refresh token is valid until revoked.
Testing the connection generates the following error:
"Failed to re-authenticate user. Please open your connection, authenticate and save the connection."
Do not exceed the limit or configure another Connected App in Salesforce.
Connecting To Salesforce
- Select Connections from the menu.
- From the Connections page select Create
to open the Create a connection dialog.
- Select the Connector from
the list to open the Connection dialog, and then enter the following information for this Connection:
- Name — This can be any meaningful name, up to 25 characters.
- Alias — An alias for this Connection name. The alias is generated from the Connection name, and can be up to 25 characters. The Connection alias can include letters, numbers, and underscores. Spaces and special characters are not accepted. You can change the alias. For more information, see Connection Alias.
- Select and configure an Authentication Type for this Connection. Note: If you are connecting to a Salesforce sandbox, replace login.salesforce.com with your sandbox URL in the Salesforce URL field. Be sure to use the appropriate User name for the sandbox. For more information, see your Salesforce administrator.
- For User Credentials —
- Salesforce URL — The web address that your site uses to reach the Salesforce web services API.
- User/Password — The Salesforce user and password. The user name must be in the form of an email address.
- Security Token— If your site has configured Salesforce to use a Security Token, enter it here. See your Salesforce administrator for more information.
- For OAuth —
- Salesforce URL — The web address that your site uses to reach the Salesforce web services API.
- For Connected OAuth App —
- Salesforce URL — The web address that your site uses to reach the Salesforce web services API.
- Client Id/Client Secret — The Salesforce Consumer Key and Consumer Secret. Note: Use the TIBCO OAuth app or create a new Connected OAuth app to connect to Salesforce. Client Id and Client Secret are required only when using your own Salesforce Connect App. See the OAuth Authentication section for information on where to find Client Id and Client Secret.
- For User Credentials —
- Authenticate — Applies to OAuth and Connected OAuth authentication. When the Connection configuration is complete, use the Authenticate button to authenticate with Salesforce. If you are not logged into Salesforce, you are asked to log in. A Salesforce authentication dialog displays. To continue the authentication process enter login credentials, which allows TIBCO Cloud™ Integration - Connect to access your Salesforce data. Select Close on the confirmation dialog. Tip: Do not test the Connection until the message at the top of the Connection dialog reads Authentication complete. Note that it may take a few minutes for this message to display.
- Query Page Size — Specifies the number of query results to return per page. Enter a value between 200 and 2000. The default value is 2000. Note: You may want to lower this value if you are querying large records or if you are getting timeout errors.
- Select one or more options for apps using this Connection:
- On schedule apps:
- IS/MS - Include Deleted Items In Query Results
- Includes records from the query that are currently in the Salesforce Recycle Bin.
- Salesforce sets the IsDeleted field to True (1) to indicate deleted records.
- If a record is deleted in Salesforce, it cannot be updated.Note: Records in the Salesforce Recycle Bin are retained for a period dictated by Salesforce and this period may change in time. For more information on this retention period, see TIBCO's Salesforce Recycle Bin And Scribe Solutions KB article.
A best practice is to run your Salesforce apps more frequently than this retention period.
- IS/MS - Use Salesforce Bulk API For Batch Operations
- Uses the Bulk API for Salesforce target operations.Note: You can choose whether to use Batch Processing for each Block in a flow, but to make the Bulk API available, you must enable Bulk API in Salesforce and select IS/MS - Use Salesforce Bulk API For Batch Operations.
- For more information about integration options for Salesforce Connections, see Salesforce Connector As An App Source.
- Uses the Bulk API for Salesforce target operations.
- IS/MS - Include Deleted Items In Query Results
- Data replication apps:
- RS - Use Salesforce Bulk API For Initial Replication
- Requires fewer Salesforce API calls.
- Bulk API must also be enabled in Salesforce.
- The replication is likely to be slower than if performed using the Salesforce Web Services API.
- RS - Automatically Refresh Metadata On Every Run
- Requires more Salesforce API calls, because the metadata must be retrieved from Salesforce.
- The replication is slower because TIBCO Cloud™ Integration - Connect is waiting for the metadata. Best practice is to leave this option disabled unless you frequently modify your schema in Salesforce, such as, by adding custom fields. Enable it temporarily whenever you edit your Salesforce schema.Note: You must manually refresh metadata to see the updated metadata reflected in the TIBCO Cloud™ Integration - Connect user interface.
- RS - Use Salesforce Bulk API For Initial Replication
- On schedule apps:
- Select Test to ensure that the agent can connect to your database. Be sure to test the Connection against all agents that use this Connection. See Testing Connections. Note: When using OAuth Authentication, testing the connection immediately saves the values on the Connection dialog. Selecting Cancel does not restore the prior configuration values.
- Select OK/Save to save the Connection.
Retry Logic
When a timeout occurs, the Salesforce Connector retries three times. Each time a retry fails, the time between retries is increased by 1 second.
Metadata Notes
Ignored Entities
The following entities are not available through the Salesforce Connector because they must be requested using a specific ID number and cannot be queried using any other method.
Ignored Salesforce Entities |
---|
IdeaComment |
CollaborationGroupRecord |
Vote |
Naming
Connection metadata must have unique entity, relationship, and field names. If your Connection metadata has duplicate names, review the source system to determine if the duplicates can be renamed.
Relationships
- Hierarchical relationships, such as grandparent, parent, grandchild relationships are not supported. See Hierarchical Data for examples.
- Target operations support some Parent/Child relationships through the use of virtual fields. See Insert, Update, And Upsert With Relationships.
- Parent/Child relationships are supported for some entities. Review the Notes On Standard Entities section for details on specific entities.
Salesforce Connector As A Data Replication App Source
Salesforce can be used as a data source for Data replication apps. The Salesforce Bulk API and the Web Services API are the available methods for replicating data from Salesforce. See Data ReplicationApps.
Recommended Salesforce Entities
When you select the Recommended entities option in a Data replication app, TIBCO Cloud™ Integration - Connect replicates all entities for which you have the appropriate permissions, including custom entities, that meet the following criteria:
- Support retrieving deleted records, which allows TIBCO Cloud™ Integration - Connect to mark them as deleted in the target datastore.
- Have a SystemModstamp field that can be used to retrieve only new and updated records.
Enabling Salesforce Bulk API
When you select the RS - Use Salesforce Bulk API For Initial Replication check box on the Salesforce Connection dialog, the Salesforce Connection uses the Salesforce Bulk API, rather than the Salesforce Web Services API. The Bulk API can be especially useful for initial replication. It may be slower than the Web Services API, but the Bulk API requires far fewer Salesforce API calls.
Replicating Data Within Salesforce API Usage Limits
Depending on your edition of Salesforce, your Data replication app may exceed the Salesforce API call usage limit for your Salesforce account.
Managing the Salesforce API call usage limit:
- If your replication reaches the API call limit threshold, it will most likely be during your initial replication run. After the initial replication, your app only updates records that have changed, which requires fewer API calls.
- If your replication is stopped by the API call limit, after Salesforce resets your API usage meter, your replication restarts from where it was stopped. Typically, the usage meter is reset every 24 hours. No data is lost if the replication stops and restarts.
Preventing your site from reaching the API call limit:
- Consider using the Salesforce Bulk API feature by selecting the Use Bulk API For Initial Replication option from the TIBCO Cloud™ Integration - Connect Salesforce Connection dialog. This feature optimizes Salesforce for loading large sets of data by allowing TIBCO Cloud™ Integration - Connect to insert a large number of records asynchronously. Using the Bulk API feature is generally slower, but uses fewer API calls. Using the Web Services API is faster, but uses more API calls. See Bulk API vs Web Services API.
- Break your initial replication up into smaller chunks of data. This may be especially helpful for the initial replication. Use the Entities feature of the Data replication app page. Each day, replicate a limited number of entities, for example, 10 entities on day 1, 10 more entities on day 2, and so on. See Selecting Source Entities.
- Balance the frequency of your replications with your available number of API calls. Each time an app runs, it generates a certain number of API calls. For example, if a replication generates a minimum of 100 API calls each time it runs, running the replication once an hour in any 24-hour period generates 2400 API calls (24 x 100). Running the same replication every 15 minutes generates 9600 API calls (24 x 4 x 100).
- Only enable the RS - Automatically Refresh Metadata On Every Run option on the TIBCO Cloud™ Integration - Connect Salesforce Connection dialog when you have modified the schema, for example, by adding custom fields. Disable it after the replication is complete to prevent it from refreshing the metadata the next time the replication runs.
For more information, see API usage metering under Implementation Considerations in the Salesforce.com Web Services Development Guide.
Net Change
After the initial replication that creates the tables and adds all the records for the selected or recommended entities in the target datastore, subsequent replications attempt to process only new and updated records. TIBCO Cloud™ Integration - Connect checks the SystemModStamp date field in the target datastore and locates the newest date for each replicated table. That date is then used as filter when querying Salesforce to select only those records that have a date higher than the date in the target datastore. In cases where there are entities that do not have a SystemModStamp date field, all records for those entities are processed each time a Data replication app is executed.
To ensure that all records are replicated, the Connector subtracts one second from the most recent SystemModStamp date field, which could cause a small number of records to be reprocessed.
For example, if the last record written had a Last Modified Date of 09/04/2018 10:10:20, the next Replication starts with data that has a Last Modified Date of 09/04/2018 10:10:19. Any records that were already processed between 09/04/2018 10:10:19 and 09/04/2018 10:10:20 are processed again.
Deleted Records In Salesforce Data Replication Apps
- Records deleted in Salesforce are not deleted in the corresponding table in the target replication database. Instead, each record has an associated value in the Scribe_DeletedOn field for the replicated table. The Scribe_DeletedOn field contains a datetime stamp that corresponds to the date and time the record was deleted from Salesforce.
Salesforce moves deleted records to the Salesforce Recycle Bin, where they are retained for a period of time before being permanently deleted. After records are permanently deleted from the Recycle Bin, they are no longer available to be processed by Data replication apps. The retention period for records in the Recycle Bin is dictated by Salesforce and may change in time. Best practice is to run your Salesforce apps more frequently than this retention period. For more information on this retention period, see TIBCO's Salesforce Recycle Bin And Scribe Solutions KB article.
For example, if the Salesforce Recycle Bin retention period is 15 days and the time between your Data replication app runs is greater than 15 days, any records deleted in Salesforce since your last Data replication app run and more than 15 days ago will not update the SCRIBE_DELETEDON field in your target Replication database tables. For this example, Best practice is to run your Salesforce Data replication apps at least once every 15 days.
Note: Data replication apps can retrieve a maximum of the past 30 days of records from the Salesforce Recycle Bin. - The process for deleting records in Salesforce is asynchronous. Therefore, the next execution of your TIBCO Cloud™ Integration - Connect Data replication app may not show a record as deleted, especially if the Data replication app execution occurs close to the actual time the deletion in Salesforce happened. A later execution of the Data replication app picks up the deletions after the asynchronous Salesforce job has run.
Custom Entities
During replication, TIBCO Cloud™ Integration - Connect automatically creates any corresponding tables for custom entities in the target datastore. Depending on your subscription, you can select the entities you want to replicate from the Entities area of the Data replication app page. See Selecting Source Entities.
If your Salesforce data contains custom entities:
- If your custom entities exist when the app first runs, those entities are replicated and no additional action is required on your part.
- If you add custom entities later, you need to do one of the following:
- Select your Salesforce Connection from the Connections page and select Reset Metadata from the menu.
- Temporarily enable the RS - Automatically Refresh Metadata On Every Run option on the Salesforce Connection dialog.
TIBCO Cloud™ Integration - Connect includes the new customizations the next time the data is replicated.
- If you select specific entities to replicate, be sure to include the new entity.
- If you are replicating either Recommended or All entities, your custom entity is automatically included.
- If you add a custom field to existing entities, the new field is added to the existing replicated table.
- The new field does not display until you reset the metadata for the Salesforce Connection.
- When the new field is created in Salesforce, the corresponding field values in the target datastore are set to NULL until you update them in Salesforce and rerun the Data replication app.
Salesforce Connector As An App Source
Filtering
When a datetime is configured on the Query block on the Block Properties Net Change Tab to query for new and updated records, that configuration is treated as an additional filter. The Net Change datetime filter is applied as an AND after any other filters specified on the Block Properties Filter Tab. TIBCO Cloud™ Integration - Connect builds a query combining both the Net Change filter and the filters on the Filter tab. See Net Change And Filters for an example.
Some Connectors for TIBCO Cloud™ Integration - Connect only support one filter. For those Connectors you can use either Net Change or one filter on the Filter tab, not both.
Native Query
- This Connector supports the Native Query Block. Use this Block to define queries using the Salesforce Object Query Language (SOQL), which is designed specifically to search Salesforce databases.
For more information about SOQL, see Salesforce Object Query Language (SOQL).
- The Native Query Block supports aggregate fields used to combine values from multiple fields into one field. This aggregated value can then be used in a separate operation.
As part of the Native Query, you can define an alias for the aggregation result:
- If you do not define an alias for an aggregation result, the result is returned in the exprn field.
For example, the following query specifies two aggregations (sum), but does not define an alias for either result. The results of those aggregations are returned in the expr0 and expr1 fields:
SELECT sum (Amount), sum (TotalOpportunityQuantity) FROM Opportunity
- If you define an alias for an aggregation result, the result is returned in a field with that alias name.
For example, the following query specifies two aggregations (sum) and defines an alias for each result (opp_amount, opp_totaloppqty). The results of those aggregations are returned in the opp_amount and opp_totaloppqty fields:
SELECT sum (Amount) opp_amount, sum (TotalOpportunityQuantity) opp_totaloppqty FROM Opportunity
- If you do not define an alias for an aggregation result, the result is returned in the exprn field.
MALFORMED_QUERY Fatal Error
Some relationships may cause a MALFORMED_QUERY to occur:
- If you perform a Query operation on an entity that is also specified as a related entity on an inner join, a MALFORMED_QUERY error occurs.
For example, if you Query Account and also specify Account as a related child entity with a ChildAccounts relationship on an inner join, the following error occurs:
Message : MALFORMED_QUERY:
WHERE (Id IN (SELECT ParentId FROM Account))
The inner and outer selects should not be on the same object typeThis error occurs when you preview the Query or run the app.
- If you perform a Query operation where the Notes entity is specified as a related entity on an inner join, a MALFORMED_QUERY error occurs.
For example, if you Query Account and specify Note as a related child entity with a Notes relationship on an inner join, the following error occurs:
Message : MALFORMED_QUERY:
WHERE (Id IN (SELECT ParentId FROM Note))
Entity 'Note' is not supported for semi join inner selectsThis error occurs when you preview the Query or run the app.
- A number of Salesforce entities, such as Case and Task, can have polymorphic relationships. These relationships are seen through TIBCO Cloud™ Integration - Connect, but are not currently supported in Salesforce. Therefore, using these relationships in TIBCO Cloud™ Integration - Connect results in the following fatal error:
MALFORMED_QUERY: SOQL TYPEOF expressions are not supported in this organization
If you receive this error, try changing your flows to perform a lookup to find the related record fields that you need by using a Lookup Block.
Batch Processing For Salesforce
- When integrating data into a Salesforce target or using Salesforce as a source, TIBCO Cloud™ Integration - Connect provides two methods to process records in batch mode:
- Salesforce Web Services API with batch processing
- Salesforce Bulk API
- For flows, you can set TIBCO Cloud™ Integration - Connect Batch Processing options on target Blocks.
- The Upsert Operation can be used with Batch Processing to reduce the number of records processed.
See Batch Processing for additional information.
Using The Salesforce Web Services API With Batch Processing
To use the Web Services API for Batch Processing, make sure that the IS - Use Salesforce Bulk API option is not selected from the TIBCO Cloud™ Integration - Connect Connections dialog for Salesforce.
Using The Salesforce Bulk API With Batch Processing
Make sure that the IS - Use Salesforce Bulk API option is selected from the TIBCO Cloud™ Integration - Connect Connection dialog for Salesforce and that Batch Processing is enabled in the appropriate operation Blocks in the flow. See Enabling Batch Processing for additional information.
Enabling Batch Processing
After you have specified whether to use the Bulk API, you need to enable Batch Processing and specify the batch size for each Block within the flow.
- From the Connection dialog for Salesforce select IS/MS - Use Salesforce Bulk API For Batch Operations.
- Begin designing your flow.
- For any target Blocks where Salesforce is your Connection, select the Process this operation in batches of check box and specify the batch size.
Salesforce Batch Size
The size of a batch can be between 1 and 10,000 records. The default size is 2000. Larger batches use fewer Salesforce API calls, but, especially if the individual records are very large, Salesforce processing may time out. To prevent timeouts the Connector uses the following Salesforce Bulk API limits to control the batch size:
- Maximum of 10,000 records per batch
- Maximum of 10,000,000 total characters for all of the data in a batch
- Maximum of 10MB of data per batch
If all of the data cannot be sent in one batch Bulk API call because of these limits, the Connector submits the data in multiple batch Bulk API calls that do not exceed these limits.
Best practice is to use the Salesforce Bulk API to integrate data that contains large fields and attachments. See the Bulk API and Web Services documentation on the Salesforce.com website for details about how Salesforce processes large amounts of data.
Salesforce Connector As An App Target
Insert, Update, And Upsert With Relationships
TIBCO Cloud™ Integration - Connect provides virtual fields used to link external IDs during Insert, Update, or Upsert operations for child or parent records. Virtual fields eliminate the need for a Lookup when adding or updating records with relationships to the target, thus reducing the number of Salesforce API calls.
External ID fields are custom fields in Salesforce with the External ID attribute enabled. These fields contain unique record identifiers from an external system, such as an email address or an ID number. Any entity can have one or more of these fields to designate relationships with other entities.
In TIBCO Cloud™ Integration - Connect, if you are working with entities that have relationships established by external IDs:
- Virtual fields are displayed on the Fields tab of the Block Properties dialog for every external ID contained in the Salesforce entity. For example, if an entity has a relationship with three other entities, TIBCO Cloud™ Integration - Connect displays three virtual fields.
- Virtual field names are constructed as follows:
<Related Entity Name_Relationship Name_External ID Field>
For example, if you were querying Accounts and then using an Upsert to update or insert Contacts that are children of those Accounts, the Fields tab of the Upsert Block might display the virtual field as follows:
Contact_childcontact_customemailaddress
Use Case
If you want to move marketing Leads and Activities from Salesforce Marketing Cloud into Salesforce and create the relationship between each Lead and its associated Activities, the process is as follows:
- In Salesforce create the following custom fields with the external ID attribute enabled:
- On the Leads entity create a custom field named ET_Lead_ID to contain the original Lead ID from Salesforce Marketing Cloud.
- On the Activities entity create a custom field named ET_Activity_ID to contain the original Activity ID from Salesforce Marketing Cloud. This allows you to update the Activity record again after it has been migrated to the Salesforce database.
- Using TIBCO Cloud™ Integration - Connect migrate Leads from Salesforce Marketing Cloud to Salesforce making sure that the ET_Lead_ID custom field is populated with the Lead ID from the Salesforce Marketing Cloud database. Salesforce creates a unique Lead ID for each lead record, therefore, you cannot use that field for the Salesforce Marketing Cloud Lead ID.
- Using TIBCO Cloud™ Integration - Connect migrate Activities from Salesforce Marketing Cloud to Salesforce. TIBCO Cloud™ Integration - Connect retrieves the relationship between Leads and Activities with the metadata from Salesforce. Any custom field in Salesforce with an Attribute of External ID on a parent or child entity displays in the Fields tab of the operation Block as a virtual field similar to the following:
Activities_ChildActivities_ET_Lead_ID
- When setting up the Insert Block in the flow to migrate Activities, link the source Lead ID on the Salesforce Marketing Cloud Activity entity to the target virtual field that represents the ET_Lead_ID custom field you created on the Leads entity in Salesforce. In this use case, the field name would be:
Activities_ChildActivities_ET_Lead_ID
TIBCO Cloud™ Integration - Connect uses the Salesforce Marketing Cloud ID contained in this virtual field to look up the Salesforce Lead ID and put that Salesforce ID in the Activity record in the Salesforce database. This process creates the relationship between each activity and its parent lead.
- Link the source Activity ID on the Salesforce Marketing Cloud Activity entity to the target virtual field that represents the ET_Activity_ID custom field you created on the Activities entity in Salesforce. This field is used to update the Activity record in Salesforce from Salesforce Marketing Cloud at a later date using the Activity record's former Salesforce Marketing Cloud ID.
Batch Processing
- The batch processing method depends on the options selected when you configured the Salesforce Connection. For information, see Batch Processing For Salesforce.
- The Upsert operation is available if the target contains an external ID field or a lookup field.
Upsert Operation
For Salesforce Connections, where you can map to an external ID. a Lookup field, or another ID field, select the Upsert operation to perform the following single-step operation:
- If a matching record is not found in the target, insert a new record.
- If a matching record is found, update the existing record.
- If more than one match is found, none of the matching records is updated and an error is generated.
An external ID field is a custom field created in Salesforce. If you map to multiple external ID fields, the Connector needs to know which ID takes priority when attempting to match records. To indicate which external ID field takes priority, enter the name of the external ID field in the ScribeExternalIDFieldName virtual field. When using an Upsert Block, note the following:
- Only one external ID field is used for the Upsert operation.
- If you have entered the name of the external ID field you want to use in the ScribeExternalIdFieldName virtual field, that ID is used.
- If the ScribeExternalIdFieldName virtual field is blank, the priority for IDs is as follows:
- Oldest External ID field
- Lookup fields
- ID fields
Case Assignments
- Scribe_CaseAssignmentId field — Links the case assignment to the Salesforce case ID.
This field is only available in the Create Block.
- If you are using the Bulk API and have configured automatic case assignments, those case assignments are executed successfully, but automatic emails are not sent.
- Creating cases in a batch operation impacts flow performance and causes a larger number of API calls to be executed if the batch contains a large number of case IDs.
To increase flow performance and reduce the number of API calls executed, do one of the following:
- Reduce the number of case IDs included in each batch. As the number of different case IDs increases, flow performance decreases.
- Include an If/Else Block in the flow to sort the records by case ID before executing. By grouping the records by case ID, each group can be processed more efficiently.
Send Operation
- The Send operation is used to make API Calls to Salesforce APIs. The Send operation can be used to support custom calls to Salesforce SOAP, REST, Composite, and other APIs.
- Send supports the Request entity used to build the HTTP call to the API.
- Send works in conjunction with the Add Block to include Headers, Cookies, or Query parameters.
- The Send and Add operations support the use of the following variables (or tokens) to make configuring customized API calls easy and robust:
Name Example Value [authToken] "00D1I000002dozd!ARMAQM27CvjgXvYQc3KU0igVKnKPjd50nFe5x45fs
MBEbIxFUkHFs12GSI7S4IVsDFBqHiPeO2yjZJWroPnVrgYVDUPeZ85_"[endpointUrl] "https://na73.salesforce.com"
[organizationId] "00D1I000001dozdUAA" - authToken — The Connector derives the value of the [authToken] variable from either the authentication token or the session ID associated with the authentication method configured in the Connection. This token is used to perform the POST, GET, and any other HTTPVerb calls using the Request entity.Note: The [authToken] must be provided in the Request Header for any HTTP request.Note: If the Authorization Token is provided explicitly, instead of using the [authToken] variable, and the token is refreshed, an error similar to the following is generated:
Operation failed. Label: Send Request, Name: RequestSend, Message: Forbidden: Error in calling Operation Send Http call failed with StatusCode 403 - Forbidden. Response Body: Bad_OAuth_Token.
- endpointUrl: The Connector derives the value of the [endpointUrl] from the Salesforce organization associated with the Connection configuration. This is the Custom Domain URL for your Salesforce organization. Use the [endpointUrl] to construct the URI for the HTTP request. Note that the value of the variable includes "https://". For example, if your domain name is tibcouser.my.salesforce.com, the [endpointUrl] contains https://tibcouser.my.salesforce.com.
- organizationId: The Connector derives the value of the [organizationId] from the Salesforce organization associated with the Connection configuration. This is the Id of your Salesforce organization. [organizationId] is used wherever the organizationId is specified as a parameter in the Salesforce API documentation.Note: You can provide [organizationId] in the Request.QueryParameters or in the Uri field of Request Entity.
- authToken — The Connector derives the value of the [authToken] variable from either the authentication token or the session ID associated with the authentication method configured in the Connection. This token is used to perform the POST, GET, and any other HTTPVerb calls using the Request entity.
-
The Send block, the Add block, and the Request entity are based on the functionality in the HTTP Connector. For more details see the HTTP Connector help.
Notes On Standard Entities
Order
- Required fields for creating an Order are Account ID, EffectiveDate, and Status. If Account ID is missing, the error message indicates that both Account ID and StatusCode are required. However, StatusCode is not required. Do not map values in the StatusCode field because this generates errors that can be ignored.
- If the Order has OrderItems, the Order must include the PriceBook2ID field. Without this field, OrderItems cannot be added to the Order.
OrderItem
- Required fields for creating an OrderItem are OrderID (parent), PriceBookEntryID, Quantity, and UnitPrice. UnitPrice is retrieved from a PriceBook2, but can be overridden.
Site
- Data for the DailyBandwithUsed and DailyRequestTimeUsed fields is stored as a decimal, but is interpreted by the SalesforceAPI as an integer. Returned values may not be as precise as expected, for example, 6.4 is returned as 6.
Miscellaneous
Performance
Under some circumstances, using Salesforce as a source can result in extremely slow processing. To improve performance:
- On the computer where the agent is installed, update the Microsoft .NET Framework to v4.7.2.
- Install any associated Microsoft Windows updates.
- Restart the agent service.
Errors
You may receive one of the following record errors when using Salesforce:
Status Code: REQUIRED_FIELD_MISSING || Error: Required fields are missing: XYZ
Resolution: There is a required field in your data that has not been mapped. Check the field mappings in your flow to make sure that all target fields in bold are properly mapped.
Status Code: DUPLICATE_VALUE || Error: Duplicate external id specified: XYZ field = ABC field
Resolution: You are trying to upsert data to a target entity with records that use the same external ID. If you are using the Upsert operation to a Salesforce target, make sure that all external ID fields are unique. This error is also generated if you are using Batch Processing and your source data contains more than one record with the same external ID within a single batch.
INVALID_TYPE_ON_FIELD_IN_RECORD
Resolution: On at least one field, your source and target data are of incompatible data types, such as if you attempt to map an ID of type GUID in the source to an Integer in the target. Make sure that data types are compatible or use one of the Data Conversion Functions.
TIBCO Cloud™ Integration - Connect API Considerations
To create Connections with the TIBCO Cloud™ Integration - Connect API, the Salesforce Connector requires the following information:
Connector Name |
Salesforce |
Connector ID |
8ADD76FC-525F-4B4B-B79E-945A6A762792 |
TIBCO Cloud™ Integration - Connect Connection Properties
In addition, this Connector uses the Connection properties shown in the following table.
Name | Data Type | Required | Secured | Usage |
---|---|---|---|---|
DeploymentType |
string |
Yes |
No |
User |
Url | string | Yes | No | |
UserId |
string |
Yes |
No |
|
Password |
string |
Yes |
Yes |
|
SecurityToken |
string |
No |
No |
|
QueryPageSize |
integer |
No |
No |
Range between 200 and 2000. If not provided, defaults to 2000. |
UseBulkApiRS |
string |
Yes |
No |
true or false |
UseBulkApiSYS |
string |
Yes |
No |
true or false |
IncludeDeletedItemsSYS |
string |
Yes |
No |
true or false |
RefreshMetaDataUponReconnect |
string |
Yes |
No |
true or false |
License Agreement
The TIBCO End User License Agreement for the Salesforce Connector describes TIBCO and your legal obligations and requirements. TIBCO suggests that you read the End User License Agreement.
More Information
For additional information on this Connector, refer to the Knowledge Base and Discussions in the TIBCO Community.