Ballerina API Documentation

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 NameData TypeDescription
accessTokenstringThe accessToken of the salesforce connected app to access the salesforce REST API
clientIdstringThe clientId of the salesforce connected app to access the salesforce REST API
clientSecretstringThe clientSecret of the salesforce connected app to access the salesforce REST API
refreshTokenstringThe refreshToken of the salesforce connected app to access the salesforce REST API
apiInstancestringThe api instance of the organization
refreshEndpointstringaccessToken: The accessToken of the salesforce connected app to access the salesforce REST API

Actions:

action createMultipleRecords()

Create multiple records

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action createRecord()

Creates new records

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action delete()

Deletes existing record

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
deleteIdstringsf: The salesforcerest connector instance

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action describeGlobal()

Lists the available objects and their metadata for your organization’s data

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action listAvailableApiVersion()

Lists summary information about each REST API version currently available

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action listOrganizationLimits()

Lists limits information for your organization

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action listResourcesByApiVersion()

Lists the resources available for the specified API version

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
requestingApiVersionstringThe api version to get resources

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action listviewQueryPerformanceFeedback()

Get feedback on how Salesforce will execute your list view

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
listViewIdstringThe id of the listview to get the feedback from

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action query()

Executes the specified SOQL query

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
queryStringstringThe request SOQL query

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action queryAll()

QueryAll will return records that have been deleted because of a merge or delete, archived Task and Event records

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
queryStringstringThe request SOQL query

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action queryAllMore()

If the queryAll results are too large, retrieve the next batch of results

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
nextRecordsUrlstringThe url sent with first batch of queryAll results to get the next batch

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action queryMore()

If the query results are too large, retrieve the next batch of results

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
nextRecordsUrlstringThe url sent with first batch of query results to get the next batch

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action queryPerformanceFeedback()

Get feedback on how Salesforce will execute your query

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
queryStringstringThe request SOQL query

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action retrieveFieldValues()

Retrieve field values from a record

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
rowIdstringThe row ID of the required record
fieldsstringThe comma separated set of required fields

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action retrieveFieldValuesFromExternalObject()

Retrieve field values from an external record

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
rowIdstringThe row ID of the required record
fieldsstringThe comma separated set of required fields

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action retrieveStandardFieldValuesFromExternalObjectWithExternalId()

Retrieve field values from an external record with external ID

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
externalIdstringThe row ID of the required external record
fieldsstringThe comma separated set of required fields

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectBasicInfo()

Describes the individual metadata for the specified object

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
sobjectNamestringThe relevant sobject name
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectDescribe()

Completely describes the individual metadata at all levels for the specified object

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
sobjectNamestringThe relevant sobject name
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectGetDeleted()

Retrieves the list of individual records that have been deleted within the given timespan for the specified object

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
startTimestringThe start time of the time span
endTimestringThe end time of the time span

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectGetUpdated()

Retrieves the list of individual records that have been updated (added or changed) within the given timespan for the specified object

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
startTimestringThe start time of the time span
endTimestringThe end time of the time span

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectPlatformAction()

Query for actions displayed in the UI, given a user, a context, device format, and a record ID

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectRows()

Accesses records based on the specified object ID

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
rowIdstringsf: The salesforcerest connector instance

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action sObjectRowsByExternalId()

Creates new records or updates existing records (upserts records) based on the value of a specified external ID field

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
fieldIdstringThe external field id
fieldValuestringThe external field value

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action update()

Updates an existing record

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
recordIdstringsf: The salesforcerest connector instance
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
messageresponse message

action upsert()

If record exists, update it else inserts it

Parameters:

Parameter NameData TypeDescription
sfClientConnectorThe salesforcerest connector instance
apiVersionstringThe api version to send request to
sobjectstringsf: The salesforcerest connector instance
externalFieldstringThe external field id
fieldValueIdstringThe external field value
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
messageresponse message


Menu

  • Connectors
    • ClientConnector (string accessToken, string clientId, string clientSecret, string refreshToken, string apiInstance, string refreshEndpoint)
      • createMultipleRecords(ClientConnector sf, string apiVersion, string sobjectName, json payload)
      • createRecord(ClientConnector sf, string apiVersion, string sobjectName, json payload)
      • delete(ClientConnector sf, string apiVersion, string sobjectName, string deleteId)
      • describeGlobal(ClientConnector sf, string apiVersion)
      • listAvailableApiVersion(ClientConnector sf)
      • listOrganizationLimits(ClientConnector sf, string apiVersion)
      • listResourcesByApiVersion(ClientConnector sf, string requestingApiVersion)
      • listviewQueryPerformanceFeedback(ClientConnector sf, string apiVersion, string listViewId)
      • query(ClientConnector sf, string apiVersion, string queryString)
      • queryAll(ClientConnector sf, string apiVersion, string queryString)
      • queryAllMore(ClientConnector sf, string apiVersion, string nextRecordsUrl)
      • queryMore(ClientConnector sf, string apiVersion, string nextRecordsUrl)
      • queryPerformanceFeedback(ClientConnector sf, string apiVersion, string queryString)
      • retrieveFieldValues(ClientConnector sf, string apiVersion, string sobjectName, string rowId, string fields)
      • retrieveFieldValuesFromExternalObject(ClientConnector sf, string apiVersion, string sobjectName, string rowId, string fields)
      • retrieveStandardFieldValuesFromExternalObjectWithExternalId(ClientConnector sf, string apiVersion, string sobjectName, string externalId, string fields)
      • sObjectBasicInfo(ClientConnector sf, string sobjectName, string apiVersion)
      • sObjectDescribe(ClientConnector sf, string sobjectName, string apiVersion)
      • sObjectGetDeleted(ClientConnector sf, string apiVersion, string sobjectName, string startTime, string endTime)
      • sObjectGetUpdated(ClientConnector sf, string apiVersion, string sobjectName, string startTime, string endTime)
      • sObjectPlatformAction(ClientConnector sf, string apiVersion)
      • sObjectRows(ClientConnector sf, string apiVersion, string sobjectName, string rowId)
      • sObjectRowsByExternalId(ClientConnector sf, string apiVersion, string sobjectName, string fieldId, string fieldValue)
      • update(ClientConnector sf, string apiVersion, string sobjectName, string recordId, json payload)
      • upsert(ClientConnector sf, string apiVersion, string sobject, string externalField, string fieldValueId, json payload)

Copyright 2017 Ballerina API Documentation