Overview
BRYTER offers a Salesforce Object Integration that enables you to build BRYTER Modules that interact with a wide range of Salesforce object types, such as Opportunity, Account, User, and Task.
This author guide is for customers who have set up the Salesforce Object Integration and wish to use the available Actions nodes and Data Sources inside their BRYTER Modules.
The Action Nodes and Data Sources made available by this Integration are:
- create-record Action node
- delete-record Action node
- get-record-by-name Action node
- read-record Action node
- read-record-relatives Action node
- search-record Action node
- update-record Action node
- upload-attachment Action node
- sobject-metadata-read Data Source
- sobject-records-read Data Source
- sobjects-list Data Source
Below are in-depth instructions for using these resources in your BRYTER modules.
About Salesforce Objects
Salesforce offers a very large number of standard objects (e.g. Account, Opportunity, Task, User, etc.), as well as any number of custom objects set up by your organization. Salesforce’s own object reference guide contains detailed information about how objects work, and what data they make available:
BRYTER Salesforce Object Integration generally will work with any object type. The integration must be set up separately, however, for each object type. This is because every object type has its own unique data structure.
The instructions and examples below use the Opportunity object as the sample object for convenience. You could substitute any other object type for Opportunity. The Action Nodes and Data Sources would be the same, but the available data would vary because the Integration inherits whatever data structure is provided by your Salesforce organization.
Note also that available data is based on the structure of your Salesforce object. For example, your company’s Opportunity object will look slightly different than ours.
Action Nodes
BRYTER Salesforce Object integration provides eight separate capabilities, each of which is reflected in a different action node.
Get an Opportunity by ID
The read-record Action node lets you get (aka “read” or “retrieve”) an Opportunity record by ID. The Action node accepts as input the Salesforce ID for the given Opportunity record. The Action node returns as outputs all of the data fields that make up the Opportunity record. You also can select individual fields to retrieve, or use @reference syntax in your module to specify the field you want to retrieve.
Get an Opportunity by Name
The get-record-by-name Action node lets you get (aka “read” or “retrieve”) an Opportunity record by name. The Action node accepts as input the name of the Opportunity record, and it returns as outputs all of the data fields that make up the Opportunity record. As above, you also can specify or select individual fields you want to retrieve.
Note that the name provided as input must be an exact match for the name of the record in Salesforce. Also, if you have multiple records in Salesforce with duplicate names, the action node will return only the first result.
Create a New Opportunity
The create-record Action node lets you create a new Opportunity record. It accepts as inputs any of the fields that are available on your Opportunity record. If any fields are mandatory, those will be indicated in the BRYTER Editor as (required):
Delete an Opportunity
The delete-record Action node lets you delete an Opportunity record, given a Salesforce ID as input, and it returns as outputs three values: the ID of the deleted object, a success message, and a list of any errors returned by Salesforce.
Update an Opportunity Record
The update-record Action node lets you update the data associated with an Opportunity record, given that record’s ID. It accepts as input the Salesforce ID of the Opportunity you wish to update, and new values for any fields you wish to modify.
Note that you must use the data types required by Salesforce. For example, you can not use a numerical value to update a text field.
Upload File as an Attachment to an Opportunity
The upload-attachment Action node lets you upload a file as an attachment (or “related file”) to an Opportunity object. It accepts as input the Salesforce Owner ID for the uploaded file, the file itself, the name of the file, and the ID for the Opportunity to which the file will be related. It returns as output the Salesforce ID for the uploaded file.
Note that currently, the Owner ID must be the same Owner ID used to create and configure the Salesforce connected app that makes the integration possible.
Search Opportunity Records
The search-record Action node lets you search across Opportunity records for records that match your search query. It accepts as input the name of the field you want to return and the search query. It returns as output a completion message, lists containing the specified field and URLs for any matching records, a count of the number of matching records, and Salesforce error messages and codes.
Note that currently this Action node can only display and use the resulting information as a Text value.
Note also that the search query must use the Salesforce Object Query Language, which is referenced here.
Retrieve Related Objects for an Opportunity
The read-record-relatives Action node lets you retrieve certain information about object records that are related to an Opportunity record. It accepts as input the Salesforce ID of the Opportunity object, the field to be retrieved for the related object, and the name of the related object. It returns as output a completion message, the IDs, selected fields, and URLs of the related object records, as well as a count of the records returned, and Salesforce error messages and codes.
Note that currently this Action node can only display and use the resulting information as a Text value.
Note also that the related object name must conform to Salesforce’s naming conventions for object relations, which are described in detail here:
Data Sources
BRYTER Salesforce Object integration provides three separate Data Source options.
List of Opportunity Records
The sobject-records-read Data Source lets you provide your end users with a drop-down list consisting of all Opportunity records. This Data Source can be used in Single Select Input nodes within a BRYTER module to present the end user with a drop-down list of possible answers. Note that the drop-down list is enabled with search and autocomplete for managing large records lists.
The values returned by this Data Source, when a single option is selected by the end user, are the name of the Opportunity object and its Salesforce ID. These resulting values can be used in other Salesforce Object Integration Action nodes. For example, an end user can select an Opportunity, and then your module can use the Salesforce ID for that Opportunity to retrieve the full Opportunity record.
List of Opportunity Metadata
The sobject-metadata-read Data Source lets you provide your end users with a drop-down list consisting of all fields available on an Opportunity record. This Data Source can be used in Single Select Input nodes within a BRYTER module to present the end user with a drop-down list of possible metadata fields for Opportunity objects. Note that the drop-down list is enabled with search and autocomplete for managing large metadata lists.
The values returned by this Data Source, when a single option is selected by the end user, are the name of the metadata field and its Salesforce ID. These resulting values can be used in other Salesforce Object Integration Action nodes. For example, an end-user can select a metadata field and then conditional logic can provide the appropriate Input node to allow the end user to update that particular metadata field on a given Opportunity record.
List of Objects
The sobjects-list Data Source lets you provide your end users with a drop-down list consisting of all object types available within your Salesforce organization. This Data Source can be used in Single Select Input nodes within a BRYTER module to present the end user with a drop-down list of possible objects with which to interact. Note that the drop-down list is enabled with search and autocomplete for managing large object lists.
The values returned by this Data Source, when a single option is selected by the end user, are the name of the object and its Salesforce ID. These resulting values can be used in other Salesforce Object Integration Action nodes. For example, an end user can select an object type and then conditional logic can provide the appropriate Salesforce Object Integration Action node to allow an end user to create a new record of that object type.
Note that this Data Source is generic and applies across all object types. Although it comes with a particular integration configuration (such as for “Opportunity” objects), it is not limited to that object. This also means that if you configure integrations for multiple object types, you will have duplicate versions of this Data Source unless you uncheck the Public option when configuring the integration.