# Sunshine Conversations: Deploy an Endpoint

**Cognigy Support**  
October 24, 2022

**Where is the Smooch Endpoint?**  
This Endpoint was previously known as the Smooch Endpoint. Smooch was acquired by Zendesk in 2019 and renamed to Sunshine Conversations.

Within our **Cognigy.AI** platform you're able to connect your Cognigy resources to your **Sunshine Conversations application** by using our Sunshine Conversations Endpoint integration.

**Inject & Notify**  
You can use the **Inject** and **Notify** functionality with this type of Endpoint. For further details see the [Inject & Notify Documentation](https://docs.cognigy.com/docs/inject-notify) page.

## Deploy a Sunshine Conversations Endpoint  
With the implementation of a Sunshine Conversations Endpoint you can easily connect your Sunshine Conversations application with Cognigy.AI.

This _How-to_ covers the necessary steps for creating and connecting a Sunshine Conversations Endpoint. If you want to get information about assigning a Flow to the Endpoint and setting up the _Data Management_ see [Endpoints](https://docs.cognigy.com/docs/endpoints).

## Two Step Preparation Process  
1. **Configure Your Sunshine Conversations App** for the usage of the Cognigy Endpoint on [Sunshine Conversations API](https://app.smooch.io/)
2. **Creation and configuration of the Sunshine Conversations Endpoint** within Cognigy.AI

## 1 Configure Your Sunshine Conversations App  
🔗 On [Sunshine Conversations API](https://app.smooch.io/)

**Requirements**  
✔ Sunshine Conversations Login  
✔ A Sunshine Conversations Workspace

### 1.1 Create a Sunshine Conversations App  
Create a Sunshine Conversations App for your Sunshine Conversations Workspace (see figure 1.1).

_Figure 1.1: Create a Sunshine Conversations App_

### 1.2 Connect to channels and integrations  
Each Sunshine Conversations app can be configured with a collection of messaging channels like Facebook Messenger, WhatsApp or Slack. In addition to configuring messaging channels using the Sunshine Conversations dashboard, Sunshine Conversations also provides APIs to configure integrations programmatically. This is particularly useful when offering Sunshine Conversations messaging capabilities as a part of your own software product.

Go to the integration tab, select and configure your integration following the instructions. You can see how it's done here: [Sunshine Conversations channels](https://docs.smooch.io/guide/configuring-messaging-channels/) (see figure 1.2).

_Figure 1.2: Connect with messaging channels_

### 1.3 Get the Key ID and Secret for verification  
To successfully connect your Sunshine Conversations App with the Cognigy.AI Endpoint you'll need the **Key ID** and **Secret** of your Sunshine Conversations App. Go to the _Settings_ tab of your Sunshine Conversations App and go to the _API keys_ section, press **\+ Create new secret key** and you will get a **Key ID** and a **Secret**. Copy and save them. Click on **Save Changes**.

## 2 Creation and configuration of the Sunshine Conversations Endpoint  
🔗 On Cognigy.AI

**Requirements**  
✔ Key ID  
✔ Secret

### 2.1 Create a Sunshine Conversations Endpoint  
First you have to create an Endpoint of the type **_Sunshine Conversations_** (see figure 2.1). To do this, navigate to the _**Endpoints**_ menu, found under the _**Deploy**_ sub-menu in the resources panel on the left of the interface. Click **_+_** _**New Endpoint**_ button at the top of the screen and select _**Sunshine Conversations**_ from the list of available endpoint types.

_Figure 2.1: Create a Sunshine Conversations Endpoint_

### 2.2 Configure the Sunshine Conversations Endpoint  
Expand the _Sunshine Conversations Setup_ panel (see figure 2.2) and paste the saved API Key ID and Secret (step 1.3) into the corresponding fields. In the URI field, just copy the base URL from your Sunshine Conversations App, depending which one you are using. It can differ from USA or EU, just look at the URL in your browser, e. g. "[https://app.smooch.io](https://app.smooch.io)".

The version of the API will depend on how you set up the webhook integration for Cognigy.AI within the Sunshine Conversations app in a later step. Cognigy.AI supports both the v1.1 and v2 API.

**Remove trailing slash ("/") from URL**  
It is very important that you insert the URL without its trailing slash ("/"). Therefore, the URL could look like the following: `https://app.smooch.io`

_Figure 2.2: Endpoint Configuration - Sunshine Conversations Setup_

### 2.3 Get the Endpoint URL  
Move to the top of the Endpoint Configuration page and copy the _Endpoint URL_ which is displayed above the _General Settings_ (see figure 2.3).

_Figure 2.3: Finding the Endpoint URL of a Sunshine Conversations Endpoint_

## Final Step: Connect Your Sunshine Conversations App to the Endpoint  
### Create Webhook  
**Requirements**  
✔ Endpoint URL

In order to connect your Sunshine Conversations App to Cognigy.AI, you will need to add a Webhook in your integrations. The Webhook will be the bridge between Sunshine Conversations and Cognigy.AI. You can create a Webhook in the integrations tab (see figure 2.3 and 2.4).

_Figure 2.3: Add Webhook_

_Figure 2.4: Webhook integration_

Create a Webhook, you will be asked to fill in a URL. Here you have to paste the _Endpoint URL_. There are also some trigger options that you can use. For now, only _AppUser messages_ and _Postbacks_ are required (see figure 2.5). When selecting the API version, ensure you select the matching version in the Endpoint settings within the Cognigy.AI endpoint.

_Figure 2.5: Webhook configuration_

Create the Webhook and you will see a notification about the connection status on top of the page.

You should be all set up to use the Sunshine Conversations Endpoint you've created with a Flow of your choice.
