Webinar

November 3rd, 2021 12:00 PM EDT
Automation for Field Services & DistributionNovember 3rd, 2021 12:00 PM EDT
Learn how creating a digital workforce can improve your supply chain processes!

Add Product Into Opportunity

Add Salesforce Product into Opportunity.

Arguments

Argument Type Default value Description
product_namestrnull
quantityintnull
opportunity_idstr, NoneNone
pricebook_namestr, NoneNone
custom_total_pricefloat, NoneNone
param product_name:
 type of the product in the Pricelist
param quantity:number of products to add
param opportunity_id:
 identifier of Opportunity, default None
param pricebook_name:
 name of the pricelist, default None
param custom_total_price:
 price that overrides quantity and product price, default None
return:True is operation is successful or False

Auth With Token

Authorize to Salesforce with security token, username and password creating instance.

Arguments

Argument Type Default value Description
usernamestrnull
passwordstrnull
api_tokenstrnull

Authorize to Salesforce with security token, username and password creating instance.

param username:Salesforce API username
param password:Salesforce API password
param api_token:
 Salesforce API security token

Create New Opportunity

Create Salesforce Opportunity object.

Arguments

Argument Type Default value Description
close_datestrnull
opportunity_namestrnull
stage_namestrClosed Won
account_namestr, NoneNone
param close_date:
 closing date for the Opportunity, format 'YYYY-MM-DD'
param opportunity_name:
 as string
param stage_name:
 needs to be one of the defined stages, defaults to "Closed Won"
param account_name:
 by default uses previously set account, defaults to None
return:created opportunity or False

Create Salesforce Object

Create Salesforce object by type and data.

Arguments

Argument Type Default value Description
object_typestrnull
object_dataAnynull
param object_type:
 Salesforce object type
param object_data:
 Salesforce object data
raises SalesforceDataNotAnDictionary:
 when object_data is not dictionary
return:resulting object as dictionary

Delete Salesforce Object

Delete Salesfoce object by type and id.

Arguments

Argument Type Default value Description
object_typestrnull
object_idstrnull
param object_type:
 Salesforce object type
param object_id:
 Salesforce object id
return:True if successful

Describe Salesforce Object

Get Salesfoce object description by type.

Arguments

Argument Type Default value Description
object_typestrnull
param object_type:
 Salesforce object type
return:object description as dictionary

Execute Dataloader Insert

Keyword mimics Salesforce Dataloader 'insert' behaviour by taking in a `input_object`representing dictionary of data to input into Salesforce, a `mapping_object` representing dictionary mapping the input keys into Salesforce keys, an `object_type` representing Salesforce object which Datahandler will handle with `operation` type.

Arguments

Argument Type Default value Description
input_objectAnynull
mapping_objectAnynull
object_typestrnull

Keyword mimics Salesforce Dataloader 'insert' behaviour by taking in a input_object`representing dictionary of data to input into Salesforce, a `mapping_object representing dictionary mapping the input keys into Salesforce keys, an object_type representing Salesforce object which Datahandler will handle with operation type.

Stores operation successes into Salesforce.dataloader_success array. Stores operation errors into Salesforce.dataloader_errors.

These can be retrieved with keywords get_dataloader_success_table and get_dataloader_error_table which return corresponding data as RPA.Table.

param input_object:
 filepath or list of dictionaries
param mapping_object:
 filepath or dictionary
param object_type:
 Salesforce object type
return:True if operation is successful

Get Dataloader Error Table

Return Dataloader error entries as `RPA.Table`

Return Dataloader error entries as RPA.Table

Get Dataloader Success Table

Return Dataloader success entries as `RPA.Table`

Return Dataloader success entries as RPA.Table

Get Opportunity Id

Get ID of an Opportunity linked to set account.

Arguments

Argument Type Default value Description
opportunity_namestrnull
param opportunity_name:
 opportunity to query
return:Id of the opportunity or False

Get Pricebook Entries

Get all pricebook entries.

return:query result

Get Pricebook Id

Get ID of a pricelist.

Arguments

Argument Type Default value Description
pricebook_namestrnull

Returns False if unique Id is not found.

param pricebook_name:
 pricelist to query
return:Id of the pricelist or False

Get Products In Pricelist

Get all products in a pricelist.

Arguments

Argument Type Default value Description
pricebook_namestrnull
param pricebook_name:
 pricelist to query
return:products in dictionary

Get Salesforce Object By Id

Get Salesforce object by id and type.

Arguments

Argument Type Default value Description
object_typestrnull
object_idstrnull
param object_type:
 Salesforce object type
param object_id:
 Salesforce object id
return:dictionary of object attributes

Get Salesforce Object Metadata

Get Salesfoce object metadata by type.

Arguments

Argument Type Default value Description
object_typestrnull
param object_type:
 Salesforce object type
return:object metadata as dictionary

Read Dictionary From File

Read dictionary from file.

Arguments

Argument Type Default value Description
mapping_filestrnull
param mapping_file:
 path to the file
return:file content as dictionary

Salesforce Query

Perform SQL query.

Arguments

Argument Type Default value Description
sql_stringstrnull
as_tableboolFalse
param sql_string:
 SQL clause to perform
param as_table:set to True if result should be RPA.Tables.Table
return:result of the SQL query

Salesforce Query Result As Table

Perform SQL query and return result as `RPA.Table`.

Arguments

Argument Type Default value Description
sql_stringstrnull

Perform SQL query and return result as RPA.Table.

param sql_string:
 SQL clause to perform
return:result of the SQL query as Table

Set Account

Set account name and id by giving either parameter.

Arguments

Argument Type Default value Description
account_namestr
account_idstr
Can be used together with keywords:
  • get_opportunity_id
  • create_new_opportunity
param account_name:
 string, defaults to ""
param account_id:
 string, defaults to ""
return:True if account was found from Salesforce, else False

Set Pricebook

Sets Pricebook to be used in Salesforce operations.

Arguments

Argument Type Default value Description
pricebook_namestrnull
param pricebook_name:
 pricelist to use

Update Salesforce Object

Update Salesfoce object by type, id and data.

Arguments

Argument Type Default value Description
object_typestrnull
object_idstrnull
object_dataAnynull
param object_type:
 Salesforce object type
param object_id:
 Salesforce object id
param object_data:
 Salesforce object data
raises SalesforceDataNotAnDictionary:
 when object_data is not dictionary
return:True if successful

Upsert Salesforce Object

Upsert Salesfoce object by type, id and data.

Arguments

Argument Type Default value Description
object_typestrnull
object_idstrnull
object_dataAnynull
param object_type:
 Salesforce object type
param object_id:
 Salesforce object id
param object_data:
 Salesforce object data
raises SalesforceDataNotAnDictionary:
 when object_data is not dictionary
return:True if successful