Skip to content

ctinator is a Stride bot which is side-kick to your commercetools project

Notifications You must be signed in to change notification settings

heshamMassoud/ctinator

Repository files navigation

ctinator

This project was developed as a part of the commercetools Summer Hack 2018.

ctinator is a Stride bot which can do the following

  • Sync categories from on commercetools project to another project.
  • Display a product in the form of a dialog box.

This project is merely a spring-boot REST service which exposes several endpoints that the Stride application can connect to for sending messages back and forth between Stride and the server while also doing some message processing.

Usage

  • After the bot is deployed somewhere to install it on stride:
  • Here's what it can do:
Message What it does
Hi @ctinator The bot will respond with a good morning greeting containing stats summary of the set commercetools project with STRIDE_PROJECT_KEY
Asking it to show/view/display product with id ctinator will respond with dialog containing the commercetools product info and a link its location on the MC and the playground.
Saying anything that contains sync Would sync all the categories from the STRIDE_PROJECT_KEY to STRIDE_TARGET_PROJECT_KEY

Configure your commercetools project

screen shot 2018-06-26 at 09 55 19

Query a Product

screen shot 2018-06-26 at 09 43 13

View a Product

screen shot 2018-06-26 at 09 42 37

Sync commercetools categories

screen shot 2018-06-26 at 09 37 22

Development

  • The bot is written as an exposed Spring-boot service using the stride-java-api for communicating with the stride application and the commercetools-jvm-sdk for communicating with commercetools.

  • The service uses the commercetools-sync-java library for the sync process.

  • The following environment variables are needed to be able to start the application

Environment Variable Description
APP_EXTERNAL_URL The Url of where the service is exposed
STRIDE_HELLO_BOT_CLIENT_ID Can be found after an app is created here
STRIDE_HELLO_BOT_SECRET Can be found after an app is created here
STRIDE_CLIENT_ID The commercetools source project client id
STRIDE_CLIENT_SECRET The commercetools source project client secret
STRIDE_PROJECT_KEY The commercetools source project key
STRIDE_TARGET_CLIENT_ID The commercetools target project client id
STRIDE_TARGET_CLIENT_SECRET The commercetools target project client secret
STRIDE_TARGET_PROJECT_KEY The commercetools target project key

About

ctinator is a Stride bot which is side-kick to your commercetools project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages