Skip to main content

Sunshine conversations

How to add Sunshine conversations

This documentation is about how to add Kodif chatbot from sunshine conversations marketplace. Make sure you add sunshine conversations integration to your chat flow. After you add sunshine conversations integration node to your flow you have to configure Sunshine switchboard so our flow can process messages.

Api Key generation

Create api key in your zendesk admin center Apps and Integrations -> Conversations API using these credentials find out switchboardIntegrationId of Zendesk Agentworkspace.

curl --location --request GET 'https://api.smooch.io/v2/apps/{{__AppID__}}/switchboards/{{__SwitchboardID__}}/switchboardIntegrations' \

--header 'Authorization: Basic {{__BASIC AUTHORIZATION__}}'

You can use above request with your AppID, SwitchboardID and Authorization.

Integraiton our chatbot to sunshine conversations

For our flow to process messages we need to add new switchboard integration you can use below request

curl --location --request POST 'https://api.smooch.io/v2/apps/{{__AppID__}}/switchboards/{{__SwitchboardID__}}/switchboardIntegrations' \

--header 'Authorization: Basic {{__BASIC AUTHORIZATION__}}' \

--header 'Content-Type: application/json' \

--data-raw '{

"name": "kodif-chatbot",

"integrationType": "kodif",

"deliverStandbyEvents": false

}'

When you run above request new switchboard integration will be created. Now we need to make it default one, and also make it next integration of Agent Workspace in order to take control when ticket is closed. We need to get ID of newly created Switchboard integration we will use it later.

Making our chatbot default

After we created our switchboard integrations we need to make it default one for switchboard

curl --location --request PATCH 'https://api.smooch.io/v2/apps/{{__AppID__}}/switchboards/{{__SwitchboardID__}}' \

--header 'Authorization: Basic {{__BASIC AUTHORIZATION__}}' \

--header 'Content-Type: application/json' \

--data-raw '{

"defaultSwitchboardIntegrationId": "{{__ID of our newly created integration__}}"

}'

Making our chatbot next after zendesk agent workspace

curl --location --request PATCH 'https://api.smooch.io/v2/apps/{{__AppID__}}/switchboards/{{__SwitchboardID__}}/switchboardIntegrations/{{__Zendesk switchboard integration ID__}}' \

--header 'Authorization: Basic {{__BASIC AUTHORIZATION__}}' \

--header 'Content-Type: application/json' \

--data-raw '{

"nextSwitchboardIntegrationId": "{{__ID of our newly created integration__}}"

}'

After all this configurations are done, we can delete Api-Key.