Salesforce Package

Latest Version 1.0.0.0
Latest Release Date 9 August 2022
By Automation Studio Team
Supports Automation Studio Versions From 7.6

Description

Use this package to connect and interact with Salesforce. You can easily create, query, update, and delete Salesforce objects.

Before Using this Package

  1. Sign up for Salesforce Developer Edition.

  2. Create a Connected App (OAuth enabled). Your project uses the connected app to connect to Salesforce.

  3. Manage access to your Connected App.

    Learn more.

Summary of Contents

This package includes:

  1. An SDK with several functions, allowing for integration with Salesforce.

  2. Four custom types: Salesforce Compound Field, Salesforce Attachment Info, Salesforce Connection, and Salesforce Object

Summary of Use

  1. Connect to Salesforce using the Salesforce Connection object.

  2. Execute a single, or series of functions offered by the SDK, as part of your automation.

Sample Project

This Salesforce sample project implements the following workflow:

  1. Connects to Salesforce using the webform login option.

    (You are prompted for your login credentials by a popup window.)

  2. Creates a Salesforce Account object, for which Salesforce returns an ID.

  3. Disconnects from Salesforce.

To get started:

  1. Download the project files here.

  2. Unzip the downloaded file.

  3. Copy the folder (Salesforce_sample) to any folder, for example, the folder where you store other Automation Studio projects:

    %appdata%\Nice_Systems\AutomationStudio\Projects

  4. Open the project in Automation Studio.

  5. Start the project by clicking Start Project.

  6. Run the workflow by clicking Run Workflow.

 

Package Types

Salesforce Connection

The Salesforce Connection type contains a single property and several functions for establishing an authenticated connection with Salesforce.

After importing the package, this type is found under Variables > > Complex variable > External Types > Imported Types.

Properties

Property

Input Type

Description

Is Connected Boolean A read-only property that indicates if a connection has been established with Salesforce. While the value is False, all functions that process Salesforce objects will fail.

Methods

Salesforce Object

The Salesforce Object is used to create a list of objects, which holds the result of a Salesforce query.

After importing the package, this type is found under Variables > > Complex variable > External Types > Imported Types.

Properties

Property

Input Type

Description

Attributes List of Key-Value Pair A list of the object's attributes and their corresponding values.
Compound Fields List of Salesforce Compound Field objects A list of compound fields associated with the Salesforce object. For example, a physical address.
Id Text The unique identifier of the Salesforce object.
Properties List of Key-Value Pair

A list of the object's properties and their corresponding values.

Raw Json Text

A raw JSON string containing the result returned by the query.

Compound Field

The Salesforce Compound Field object groups together multiple elements of simple data types, such as numbers or text, to represent complex data types, such as a physical address.

Learn more.

After importing the package, this type is found under Variables > > Complex variable > External Types > Imported Types.

Properties

Property

Input Type

Description

Name Text The name of a compound field associated with a Salesforce object.
Field Properties List of Key-Value Pair A list of the compound field's properties and their corresponding values.

Attachment Info

Properties

The Salesforce Attachment Info object contains information regarding an attachment to a Salesforce object.

After importing the package, this type is found under Variables > > Complex variable > External Types > Imported Types.

Property

Input Type

Description

Attachment Id Text The unique identifier of the attached file.
File Name Text The name of the attached file (extension type included).
File Size Number The size of the file (bytes)
Last Modified DateTime The date and time the file was uploaded to Salesforce.

Package Functions

A successful connection to Salesforce is a prerequisite for using the functions that access Salesforce objects.