Skip to main content

Workflow Operations

The Fynd Boltic SDK provides workflow integration capabilities that let you execute activities against third-party integrations, poll for results, browse available integrations, and fetch form schemas — all programmatically.

import { createClient } from "@boltic/sdk";

const client = createClient("your-api-key");

// All workflow operations
const workflow = client.workflow;

What are Workflow Operations?

Workflow operations in the Fynd Boltic SDK allow you to:

  • Execute Integration Activities: Trigger API calls, database operations, or any supported integration activity
  • Poll for Results: Automatically wait for asynchronous executions to complete
  • Fire-and-Forget: Trigger activities without waiting for the result
  • Browse Integrations: List all available integrations and their capabilities
  • Manage Credentials: Fetch stored credentials for connected integrations
  • Inspect Schemas: Retrieve resource/operation schemas and form field definitions

Core Functions

FunctionDescription
executeIntegration(params)Execute an activity with optional auto-polling
getIntegrationExecuteById(id)Retrieve the result of an execution by ID
getIntegrations(params?)List available integrations
getCredentials(params)Fetch credentials for an integration entity
getIntegrationResource(params)Get resource/operation schema for an integration
getIntegrationForm(params)Get form field schema for a resource + operation

Quick Example

import { createClient } from "@boltic/sdk";

const client = createClient("your-api-key");

// Execute an API call and wait for the result
const result = await client.workflow.executeIntegration({
data: {
type: "apiActivity",
name: "fetch-products",
properties: {
method: "get",
endpoint: "https://dummyjson.com/products",
integration_slug: "blt-int.api",
},
},
});

if (result.error) {
console.error("Failed:", result.error.message);
} else {
console.log("Result:", result.data);
}

Response Structure

All workflow operations return a response following the standard Boltic format:

// Success
interface BolticSuccessResponse<T> {
data: T;
message?: string;
}

// Error
interface BolticErrorResponse {
error: {
code: string;
message: string;
meta: string[];
};
}

Check for errors using the error property before accessing data.