Salesforce - this class provides a simple abstraction layer between SOAP::Lite and Salesforce.com.
This class provides a simple abstraction layer between SOAP::Lite and Salesforce.com. Because SOAP::Lite does not support complexTypes, and document/literal encoding is limited, this module works around those limitations and provides a more intuitive interface a developer can interact with.
The login method returns a 1 if the login attempt was successful, and 0 otherwise. Upon a successful login, the sessionId is saved and the serverUrl set properly so that developers need not worry about setting these values manually.
login
The following are the accepted input parameters:
A Salesforce.com username.
The password for the user indicated by username.
username
Executes a query against the specified object and returns data that matches the specified criteria.
The query string to use for the query. The query string takes the form of a basic SQL statement. For example, "SELECT Id,Name FROM Account".
See also: http://www.sforce.com/us/docs/sforce40/sforce_API_calls_SOQL.html#wp1452841
This sets the batch size, or size of the result returned. This is helpful in producing paginated results, or fetch small sets of data at a time.
Retrieves the next batch of objects from a query.
query
The handle or string returned by query. This identifies the result set and cursor for fetching the next set of rows from a result set.
Updates one or more existing objects in your organization's data. This subroutine takes as input a single perl HASH containing the fields (the keys of the hash) and the values of the record that will be updated.
The hash must contain the 'Id' key in order to identify the record to update.
Adds one or more new individual objects to your organization's data. This takes as input a HASH containing the fields (the keys of the hash) and the values of the record you wish to add to your arganization.
The hash must contain the 'Type' key in order to identify the type of the record to add.
Deletes one or more individual objects from your organization's data. This subroutine takes as input an array of SCALAR values, where each SCALAR is an sObjectId.
Retrieves the current system timestamp (GMT) from the sforce Web service.
Retrieves personal information for the user associated with the current session.
A user ID
Retrieves the list of individual objects that have been updated (added or changed) within the given timespan for the specified object.
Identifies the type of the object you wish to find updates for.
A string identifying the start date/time for the query
A string identifying the end date/time for the query
Retrieves the list of individual objects that have been deleted within the given timespan for the specified object.
Identifies the type of the object you wish to find deletions for.
Describes metadata (field list and object properties) for the specified object.
The type of the object you wish to have described.
Retrieves a list of available objects for your organization's data.
Sets the specified user's password to the specified value.
A user Id.
The new password to assign to the user identified by userId.
userId
Changes a user's password to a server-generated value.
A comma delimitted list of field name you want retrieved.
The type of the object being queried.
The id of the object you want returned.
The search string to be used in the query. For example, "find {4159017000} in phone fields returning contact(id, phone, firstname, lastname), lead(id, phone, firstname, lastname), account(id, phone, name)"
use Salesforce; my $service = new Salesforce::SforceService; my $port = $service->get_port_binding('Soap'); $port->login('username' => $user,'password' => $pass) || die "Could not login to salesforce.com";
my $service = new Salesforce::SforceService; my $port = $service->get_port_binding('Soap'); my $result = $port->login('username' => $user, 'password' => $pass); $result = $port->search('searchString' => 'find {4159017000} in phone fields returning contact(id, phone, firstname, lastname), lead(id, phone, firstname, lastname), account(id, phone, name)');
Please visit Salesforce.com's user/developer forums online for assistance with this module. You are free to contact the author directly if you are unable to resolve your issue online.
Byrne Reese <byrne at majordojo dot com>
Copyright 2003-2004 Byrne Reese. All rights reserved.
To install Salesforce, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Salesforce
CPAN shell
perl -MCPAN -e shell install Salesforce
For more information on module installation, please visit the detailed CPAN module installation guide.