Module salesforce.einstein

ballerinax/salesforce.einstein Ballerina library

1.3.2

Overview

The Einstein Vision and Einstein Language API connector(https://metamind.readme.io/reference#predictive-vision-service-api) OpenAPI specification.

Allows you to access the Einstein Vision and Einstein Language services via the standard REST API calls. Use the APIs to programmatically work with datasets, labels, examples, models, and predictions.

Key Features

  • Programmatic access to create and manage resources via REST API
  • Manage user accounts and profiles
  • Secure authentication with API key or OAuth support

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the Salesfore Einstein Vision and Einstein Language connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/salesforce.einstein module into the Ballerina project.

Copy
import ballerinax/salesforce.einstein;

Step 2 - Create a new connector instance

You can now make the connection configuration using the <ACCESS_TOKEN>.

Copy
einstein:ClientConfig clientConfig = {
    auth : {
        token: `<ACCESS_TOKEN>`
    }
};

einstein:Client baseClient = check new Client(clientConfig);

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example to list datasets using the connector.

    Copy
    public function main() {
        einstein:DatasetList|error result = baseClient->listDatasets();
        if (result is einstein:DatasetList) {
            log:printInfo(result.toString());
        } else {
            log:printInfo(result.toString());
        }
    }
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/salesforce.einstein;Copy

Other versions

Metadata

Released date: 3 days ago

Version: 1.3.2

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.8.0

GraalVM compatible: Yes


Pull count

Total: 34

Current verison: 0


Weekly downloads


Source repository


Keywords

Type/Connector

Vendor/Salesforce

Area/Developer Tools

Business Intelligence/Analytics

Cost/Freemium


Contributors