Functions of org.wso2.ballerina.connectors.salesforcerest package
function buildBaseUrl(string apiInstance) (string )
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiInstance | string |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string |
Connectors of org.wso2.ballerina.connectors.salesforcerest package
connector ClientConnector (string accessToken, string clientId, string clientSecret, string refreshToken, string apiInstance, string refreshEndpoint)
Salesforcerest client connector
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
accessToken | string | The accessToken of the salesforce connected app to access the salesforce REST API |
clientId | string | The clientId of the salesforce connected app to access the salesforce REST API |
clientSecret | string | The clientSecret of the salesforce connected app to access the salesforce REST API |
refreshToken | string | The refreshToken of the salesforce connected app to access the salesforce REST API |
apiInstance | string | The api instance of the organization |
refreshEndpoint | string | accessToken: The accessToken of the salesforce connected app to access the salesforce REST API |
action createMultipleRecords(string apiVersion, string sobjectName, json payload)
Create multiple records
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
payload | json | json payload containing record data |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action createRecord(string apiVersion, string sobjectName, json payload)
Creates new records
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
payload | json | json payload containing record data |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action delete(string apiVersion, string sobjectName, string deleteId)
Deletes existing record
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
deleteId | string | apiVersion: The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action describeGlobal(string apiVersion)
Lists the available objects and their metadata for your organization???s data
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action listAvailableApiVersion()
Lists summary information about each REST API version currently available
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action listOrganizationLimits(string apiVersion)
Lists limits information for your organization
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action listResourcesByApiVersion(string requestingApiVersion)
Lists the resources available for the specified API version
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
requestingApiVersion | string | The api version to get resources |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action listviewQueryPerformanceFeedback(string apiVersion, string listViewId)
Get feedback on how Salesforce will execute your list view
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
listViewId | string | The id of the listview to get the feedback from |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action query(string apiVersion, string queryString)
Executes the specified SOQL query
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
queryString | string | The request SOQL query |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action queryAll(string apiVersion, string queryString)
QueryAll will return records that have been deleted because of a merge or delete, archived Task and Event records
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
queryString | string | The request SOQL query |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action queryAllMore(string apiVersion, string nextRecordsUrl)
If the queryAll results are too large, retrieve the next batch of results
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
nextRecordsUrl | string | The url sent with first batch of queryAll results to get the next batch |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action queryMore(string apiVersion, string nextRecordsUrl)
If the query results are too large, retrieve the next batch of results
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
nextRecordsUrl | string | The url sent with first batch of query results to get the next batch |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action queryPerformanceFeedback(string apiVersion, string queryString)
Get feedback on how Salesforce will execute your query
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
queryString | string | The request SOQL query |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action retrieveFieldValues(string apiVersion, string sobjectName, string rowId, string fields)
Retrieve field values from a record
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
rowId | string | The row ID of the required record |
fields | string | The comma separated set of required fields |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action retrieveFieldValuesFromExternalObject(string apiVersion, string sobjectName, string rowId, string fields)
Retrieve field values from an external record
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
rowId | string | The row ID of the required record |
fields | string | The comma separated set of required fields |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action retrieveStandardFieldValuesFromExternalObjectWithExternalId(string apiVersion, string sobjectName, string externalId, string fields)
Retrieve field values from an external record with external ID
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
externalId | string | The row ID of the required external record |
fields | string | The comma separated set of required fields |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectBasicInfo(string sobjectName, string apiVersion)
Describes the individual metadata for the specified object
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
sobjectName | string | The relevant sobject name |
apiVersion | string | The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectDescribe(string sobjectName, string apiVersion)
Completely describes the individual metadata at all levels for the specified object
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
sobjectName | string | The relevant sobject name |
apiVersion | string | The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectGetDeleted(string apiVersion, string sobjectName, string startTime, string endTime)
Retrieves the list of individual records that have been deleted within the given timespan for the specified object
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
startTime | string | The start time of the time span |
endTime | string | The end time of the time span |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectGetUpdated(string apiVersion, string sobjectName, string startTime, string endTime)
Retrieves the list of individual records that have been updated (added or changed) within the given timespan for the specified object
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
startTime | string | The start time of the time span |
endTime | string | The end time of the time span |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectPlatformAction(string apiVersion)
Query for actions displayed in the UI, given a user, a context, device format, and a record ID
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectRows(string apiVersion, string sobjectName, string rowId)
Accesses records based on the specified object ID
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
rowId | string | apiVersion: The api version to send request to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action sObjectRowsByExternalId(string apiVersion, string sobjectName, string fieldId, string fieldValue)
Creates new records or updates existing records (upserts records) based on the value of a specified external ID field
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
fieldId | string | The external field id |
fieldValue | string | The external field value |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action update(string apiVersion, string sobjectName, string recordId, json payload)
Updates an existing record
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobjectName | string | The relevant sobject name |
recordId | string | apiVersion: The api version to send request to |
payload | json | json payload containing record data |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |
action upsert(string apiVersion, string sobject, string externalField, string fieldValueId, json payload)
If record exists, update it else inserts it
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
apiVersion | string | The api version to send request to |
sobject | string | apiVersion: The api version to send request to |
externalField | string | The external field id |
fieldValueId | string | The external field value |
payload | json | json payload containing record data |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
Response | response message |