Skip to main content

Samsung Bixby

This section describes how to integrate a Samsung Bixby capsule with Botanalytics.

This section is designed for the the latest version of Botanalytics, which is currently on private beta.

If you would like to join the beta and use the latest version of Botanalytics, follow the instructions.

Prerequisites

A Samsung Bixby capsule that:

Integration

Copy Botanalytics library

Copy the botanalytics.js file from our official GitHub repository to the code/lib/ folder in your Samsung Bixby capsule.

Add Configurations & Secrets

On Samsung Bixby Developer Console, open the Configuration & Secrets page under your capsule settings and set required values.

Secrets

NameRequiredDefaultDescription
botanalytics.apiKeyYesHas no defaultAPI key that is provided when a Samsung Bixby channel is added to a project.

Configurations

NameRequiredDefaultDescription
botanalytics.baseUrlNohttps://api.beta.botanalytics.co/v2Base URL to be used for sending requests. Do not change this unless instructed by the Botanalytics team.
botanalytics.failFastNonoWhether to fail when an exception is encountered when sending data to Botanalytics. To enable this feature, set this to true or yes.

Log interactions with your capsule

Import Botanalytics library:

import { logInput, logOutput } from './lib/botanalytics.js';

Log input by passing action or intent name:

logInput('findCapital', input);

In JavaScript Runtime Version 2, functions instead receive a single parameter, an object with key/value pairs whose keys correspond to the input keys in the action. logOutput method returns the provided output, so you can log and return the value in a single statement.

Log output by passing action or intent name, input and output to be returned.

  return logOutput('findCapital', input, {
    capital: capital,
    stateGraphic: stateGraphic,
  });

Next Steps