ballerinax/salesforce.pardot Ballerina library

1.3.1

Overview

This is a generated connector for Salesforce Pardot API v5 OpenAPI specification.

The version 5 of the Pardot API to read and update a variety of assets and objects, like File and Layout Template objects.

Prerequisites

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

Quickstart

To use the Salesfore Pardot connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

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

Copy
import ballerinax/salesforce.pardot;

Step 2 - Create a new connector instance

You can now make the connection configuration using the access token.

Copy
pardot:ClientConfig clientConfig = {
    auth : {
        token: token
    }
};

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

Step 3 - Invoke connector operation

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 get data of a campaign using the connector.

Copy
public function main() {
     string fieldsToRead = "id,name,isDeleted";
     string campaignId = "7015g000000LioNAAS";

     pardot:Record|error data = baseClient->readCampaign(fieldsToRead, campaignId);
     if (data is pardot:Record) {
          log:printInfo("Campaign " + data.toString());
     } else {
          log:printInfo("Error Occured");
     }
}
  1. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/salesforce.pardot;Copy

Metadata

Released date: over 1 year ago

Version: 1.3.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 2

Current verison: 1


Weekly downloads


Source repository


Keywords

Marketing/Marketing Automation

Cost/Paid


Contributors

Other versions