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.
- After the bot is deployed somewhere to install it on stride:
- Add a custom app to a conversation on stride.
- Paste the installation URL of where ctinator is deployed via https://developer.atlassian.com/apps/
- And now simply talk to it! :)
- 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 |
-
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 |