Vendasta v2
Provides integration with Vendasta to work with CRM records, schemas and pipelines, social and blog posts, reviews, listings and Net Promoter Scores, meetings, and business users through one Connection. Use it to query, create, update and delete CRM contacts, companies, opportunities and custom objects, schedule social posts, respond to reviews, and book, reschedule or cancel meetings in your Workflows. The Node is available on Cloud Runtime clusters.
Revision History
0.0.0.2 - Initial release.
Connection
This Connection identifies the Vendasta environment and stores the credentials used by every Vendasta Method. Choose an AuthenticationType, only the properties for the selected type are shown.
| Property | Type | Description |
|---|---|---|
Environment |
Enum | Production or Demo. Credentials and data belong to one environment, so select the environment in which the credentials were issued. |
AuthenticationType |
Enum | ServiceAccount to obtain access tokens from a Vendasta service account key, or AccessToken to supply a bearer token yourself. |
ServiceAccountCredentials |
Masked | ServiceAccount only. The complete service account key JSON downloaded from Vendasta. The key must use the RS256 algorithm. |
Scopes |
String | ServiceAccount only. Space-separated scopes requested for each access token. Defaults to profile email crm business-app meeting user. Include profile or email so that the Connection test can succeed. |
AccessToken |
Masked | AccessToken only. A Vendasta bearer token for the selected environment. Replace it when it expires. |
TimeoutSeconds |
Integer | Maximum number of seconds for each request to Vendasta. Defaults to 100 and must be between 1 and 3600. |
Setup Notes
- In Vendasta, create a service account for the environment you will use and download its key JSON. Alternatively, obtain an access token for that environment.
- Create a
VendastaConnectionin Flowgear and select the matchingEnvironment. - For
ServiceAccount, paste the downloaded key JSON intoServiceAccountCredentialswithout changing it, and enter the scopes your Workflows need inScopes. Request narrower scopes than the default when you only use some of the APIs. For example, CRM operations usecrm, Meetings operations usemeetingandbusiness-app, Reputation and Social Posts operations usebusiness-app, and Business Center user operations useuser. Vendasta's API reference lists the scopes for each operation. - For
AccessToken, enter the token inAccessToken. - Test the
Connection. The test requests the identity of the authenticated user and needs theprofileoremailscope. A successful test confirms the credentials and environment, but does not confirm access to a specific product or business.
With ServiceAccount, the Node obtains a new short-lived access token for each run, renews it before it expires, and does not save it on the Connection. If Vendasta rejects a token during a run, the Node renews it once. With AccessToken, the token cannot be renewed automatically, so an expired or rejected token stops the Node.
Methods
Each Method exposes templates for a fixed set of Vendasta operations across six APIs: CRM, Social Posts, Reputation, Meetings, Business Center and Composer. Template names start with the API family followed by the Vendasta operation name, for example CRM and Create Contact. Select a template to populate the OperationId, a GUID identifying that operation, and the operation's input and Response fields. An OperationId from a different Method is rejected.
Query uses Options for the request. Create, Update, Delete and Action use Items, with one Vendasta request per row. All template inputs use Vendasta's field names.
| Method | Supported operations |
|---|---|
Query |
CRM: list and get companies, contacts, opportunities, custom objects, associations, custom object types, field schemas, field schema customizations, pipelines and added field extensions, get field extensions, list field options, and list custom object filters. Social Posts: list and get social posts, and list postable social services. Reputation: search, get and check whether you can respond to reviews, get review history and review metrics, list and get NPS details, and get and look up listings. Meetings: list users, groups, services, team and user event types, and available time slots. Business Center: list users for a business. |
Create |
CRM: create companies, contacts, opportunities, custom objects, associations, custom object types, field extensions, field schemas, field schema customizations and pipelines. Social Posts: schedule social posts and publish blog posts. Reputation: leave or import Net Promoter Scores and create review comments. Meetings: book a meeting. |
Update |
CRM: update companies, contacts, opportunities, custom objects, associations, custom object types, field extensions, field schemas, field schema customizations and pipelines. Social Posts: update blog posts. Composer: update posts. Reputation: update reviews, review comments and review user deleted information. Meetings: reschedule a meeting. |
Delete |
CRM: delete companies, contacts, opportunities, custom objects, associations, custom object types, field extensions, field schema customizations and pipelines, and bulk delete custom objects. Social Posts: delete social posts and blog posts. Meetings: cancel a meeting. |
Action |
CRM: restore companies, contacts, opportunities and custom objects, validate a custom object, add or remove a field extension, and archive a field schema. Reputation: force a listing refresh. |
Query
Reads Vendasta records using the selected template. The Node retrieves subsequent pages automatically as you consume Response.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Vendasta Connection used to authenticate the request. |
OperationId |
String | GUID supplied by the selected query template. |
Options |
Object | The request fields for the selected operation, such as namespace, crmObjectIds, fieldMask, filtersV2, sortBy or search. Paging is managed by the Node. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per returned record. Single-record operations return one row. When an operation returns a list of plain values, a single row contains that list as a CSV string. A query with no matching results returns no rows. |
Create
Creates, imports, schedules or books one Vendasta resource for each row in Items.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Vendasta Connection used to authenticate the request. |
OperationId |
String | GUID supplied by the selected create template. |
Items |
Array | Required. One create request per row, using the fields shown by the selected template. An empty connected stream creates nothing. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One result per input row containing the fields returned by Vendasta, such as the new crmObjectId, and Flowgear.IsSuccess, Flowgear.Message and Flowgear.Request. The request contains the original row. |
Update
Updates one Vendasta resource, or reschedules one meeting, for each row in Items.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Vendasta Connection used to authenticate the request. |
OperationId |
String | GUID supplied by the selected update template. |
Items |
Array | Required. One update request per row, using the fields shown by the selected template, including the identifier of the resource to update. An empty connected stream performs no updates. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One result per input row containing the fields returned by Vendasta and Flowgear.IsSuccess, Flowgear.Message and Flowgear.Request. |
Delete
Deletes one Vendasta resource, or cancels one meeting, for each row in Items. Templates never supply a default identifier.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Vendasta Connection used to authenticate the request. |
OperationId |
String | GUID supplied by the selected delete template. |
Items |
Array | Required. One delete request per row, identifying the resource to delete, for example namespace and crmObjectId for a CRM record. An empty connected stream deletes nothing. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One result per input row with Flowgear.IsSuccess, Flowgear.Message and Flowgear.Request, including when Vendasta returns an empty response. |
Action
Performs the selected Vendasta action, such as restoring a deleted CRM record or validating a custom object, for each row in Items.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Vendasta Connection used to authenticate the request. |
OperationId |
String | GUID supplied by the selected action template. |
Items |
Array | Required. One action request per row, using the fields shown by the selected template. An empty connected stream performs no actions. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One result per input row containing the fields returned by Vendasta and Flowgear.IsSuccess, Flowgear.Message and Flowgear.Request. Validate Custom Object returns one row per validation error, with warnings marked as successful and other errors marked as failed, or a single successful row when there are no errors. |
Usage Notes
- Most CRM operations require a
namespace, which identifies the business whose CRM you are working with, for example an account group ID such asAG-.... The credentials must have access to that business. - CRM records store their values in
crmObject.fields, one entry per field. Name each field by itsfieldIdor by itsexternalId; built-in fields use external IDs such asstandard__first_name. Use the CRMList Field Schematemplate for the object type to discover field IDs and external IDs. - Use
fieldMask.pathsto limit the fields returned or updated, for examplefields.standard__first_namewhen getting contacts, orownerIdwhen updating a contact. Template samples show the format for each operation. Custom object samples contain a placeholder field ID that you must replace with a field of your custom object type. - Filter and sort samples, such as
filtersV2andsortBy, illustrate the syntax and are not applied unless you enter a value. - A contact's companies and opportunities are held as associations. Use the CRM
List Associationstemplate with afiltersV2filter on theassociation_typefield, for exampleContact-Company. - Let the Node handle paging. Do not supply
cursor,pageSize,pagingOptionsorpaging. Fields that are not in the selected template, read-only fields, and values that do not match the field's type or allowed values are rejected before the request is sent. - Map string and integer lists, such as
crmObjectIdsandfieldMask.paths, as CSV strings. Quote values containing commas, quotes or line breaks, and double any quotes inside a quoted value. Spaces are preserved. An empty string represents an empty list, while""represents one empty string. Lists of objects remain structured. List values returned by Vendasta use the same CSV format. - Many numeric fields, such as
integerValue, are strings in Vendasta's API. Supply them as strings. - When Vendasta wraps the request in a single object, for example
pipelinewhen creating a pipeline orblogPostwhen updating a blog post, the template shows that object's fields directly and the Node adds the wrapper. Schedule Social Postsand ComposerUpdate Postssend one post per row inItems. A scheduled post is reported as successful only when Vendasta accepts it for scheduling. Composer returns a row for each updated post and for each post that Vendasta rejects.Book meetingreturns one row with the booked meeting's details, includingmeetingId. Attendee email addresses are returned as a CSV string.- CRM get operations for associations fail when Vendasta cannot retrieve every requested association. Check the record IDs and access.
- Deleted CRM companies, contacts, opportunities and custom objects are retained by Vendasta and can be restored using the matching
Actiontemplate. - Check
Flowgear.IsSuccessfor everyCreate,Update,DeleteandActionresult. When Vendasta rejects an individual row because it is invalid, not found or already exists, the Node returns a failed row containing Vendasta'scode,messageanddetailsand continues with later rows.detailsis returned as JSON text. Authentication failures, access-denied responses, server errors, timeouts and connection failures stop the Node. - Consume the response stream to process every query page or input row. The first page or write runs when the Node starts, and later pages and rows are processed as the stream advances.
- When Vendasta limits the request rate, the Node waits for the period Vendasta specifies and retries up to two times. If Vendasta requires a wait of more than one hour, the Node stops. Writes that time out or fail because of a server or connection error are not retried. Check Vendasta before repeating a write because the request may already have succeeded.
Examples
Create a contact
Select the Create template for the CRM Create Contact operation and supply the following object as a row in Items:
{
"namespace": "AG-EXAMPLE",
"crmObject": {
"fields": [
{
"externalId": "standard__first_name",
"stringValue": "Jane"
}
]
}
}
When Flowgear.IsSuccess is true, the result's crmObjectId contains the ID of the new contact.
Get contacts by ID
Select the Query template for the CRM Get Multi Contact operation and supply the following Options object:
{
"namespace": "AG-EXAMPLE",
"crmObjectIds": "ContactID-00000000-0000-0000-0000-000000000001,ContactID-00000000-0000-0000-0000-000000000002",
"fieldMask": {
"paths": "fields.standard__first_name"
}
}
Each row in Response is one contact containing the requested fields.
Known Issues
- Composer
Update Postscan fail with the message that the endpoint does not have scopes defined. Contact Vendasta support before retrying the operation. - CRM field options queries return up to 100 options, so the result might not include every available option.