> For the complete documentation index, see [llms.txt](https://developer.konverse.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.konverse.ai/platform/embedded-functions.md).

# Embedded Functions

Our Platform allows you to send embed functions written in node JS which allows you integrate third-party APIs directly inside your chatbot

```
let { ExtendedLogger } = require("@function-logger");
let logger = new ExtendedLogger("default", "bot_id", "functionNamespace");
module.exports = async (ctx) => {
    let session = ctx.session;
    let config = ctx.config;
    let metadata = ctx.metadata;
    let params = ctx.params;
    let visitor = ctx.visitor;
    return new Promise((resolve, reject) => {
        //...your code goes here
        resolve(ctx);		//Always resolve ctx variable
    })
}
```

Embedded functions as a services pass the conversation context (ctx) into your function allows to to return response, and process information that the chatbot has collected about the visitor and their sessions
