Ballerina API Documentation

Functions of org.wso2.ballerina.connectors.salesforcesoap package

function addFields(xml payload, map fields, string xpath)

Parameters:

Parameter NameData TypeDescription
payloadxml
fieldsmap
xpathstring

function isSessionExpired(xml soapResponse) (boolean )

Parameters:

Parameter NameData TypeDescription
soapResponsexml

Return Parameters:

Return VariableData TypeDescription
boolean

function login(string username, string password, string loginUrl, string soapVersion) (xml )

Parameters:

Parameter NameData TypeDescription
usernamestring
passwordstring
loginUrlstring
soapVersionstring

Return Parameters:

Return VariableData TypeDescription
xml


Connectors of org.wso2.ballerina.connectors.salesforcesoap package

connector ClientConnector (string username, string password, string loginUrl, string soapVersion)

Salesforcesoap client connector

Parameters:

Parameter NameData TypeDescription
usernamestringSalesforce Username
passwordstringSalesforce Password + Security Token
loginUrlstringLogin Url of Salesforce
soapVersionstringSoap version

Actions:

action createRecord()

Adds one or more new records to your organization’s data

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
fieldsmapMap of fields of records

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action deleteRecord()

Deletes one or more records from your organization’s data

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
recordIdstringId of Record to be deleted

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action describeGlobal()

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

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action describeSObject()

Retrieves metadata (field list and object properties) for the specified object type

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
typestringName of SObject

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action describeSObjects()

An array-based version of describeSObject

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
typestringName of SObject

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action query()

Executes a query against the specified object and returns data that matches the specified criteria

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
querystringQuery String

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action queryAll()

Retrieves data from specified objects, whether or not they have been deleted

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
querystringQuery String

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action queryMore()

Retrieves the next batch of objects from a query

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
queryLocatorstringUrl to retrieve the balance query results

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action retrieve()

Retrieves one or more records based on the specified IDs

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
fieldListstringList of fields that needs to be retrieved
typestringName of SObject
recordIdstringId of Record

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action search()

Executes a text search in your organization’s data

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
querystringSearch String

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action updateRecord()

Updates one or more existing records in your organization’s data

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
fieldsmapMap of fields of records

Return Parameters:

Return VariableData TypeDescription
xmlresponse message

action upsertRecord()

Creates new records and updates existing records

Parameters:

Parameter NameData TypeDescription
sClientConnectorThe salesforcesoap connector instance
headersxml[]Soap header values
externalIdstringExternal Id
fieldsmapMap of fields of records

Return Parameters:

Return VariableData TypeDescription
xmlresponse message


Menu

  • Functions
    • addFields(xml payload, map fields, string xpath)
    • isSessionExpired(xml soapResponse) (boolean )
    • login(string username, string password, string loginUrl, string soapVersion) (xml )
  • Connectors
    • ClientConnector (string username, string password, string loginUrl, string soapVersion)
      • createRecord(ClientConnector s, xml[] headers, map fields)
      • deleteRecord(ClientConnector s, xml[] headers, string recordId)
      • describeGlobal(ClientConnector s, xml[] headers)
      • describeSObject(ClientConnector s, xml[] headers, string type)
      • describeSObjects(ClientConnector s, xml[] headers, string type)
      • query(ClientConnector s, xml[] headers, string query)
      • queryAll(ClientConnector s, xml[] headers, string query)
      • queryMore(ClientConnector s, xml[] headers, string queryLocator)
      • retrieve(ClientConnector s, xml[] headers, string fieldList, string type, string recordId)
      • search(ClientConnector s, xml[] headers, string query)
      • updateRecord(ClientConnector s, xml[] headers, map fields)
      • upsertRecord(ClientConnector s, xml[] headers, string externalId, map fields)

Copyright 2017 Ballerina API Documentation