Overview of IBM Watson and Zendesk Integration
- Integrating IBM Watson with Zendesk can enhance customer support by utilizing Watson's AI capabilities to automate responses and provide insights.
- The integration uses Watson Assistant to interact with users and integrate those interactions into Zendesk tickets.
Prerequisites
- Have an active IBM Cloud account with access to Watson Assistant.
- Access to a Zendesk account with administrator privileges.
- Basic understanding of both Zendesk and Watson Assistant platforms.
Set Up Watson Assistant
- Log into your IBM Cloud account and navigate to the Watson Assistant service.
- Create a new instance of Watson Assistant, giving it an appropriate name.
- Define a new dialog skill or import existing dialog skills that meet your needs.
- Configure intents, entities, and dialog nodes to handle the type of inquiries you wish to manage.
Obtain Watson Assistant API Credentials
- Select the 'API Details' tab under your Watson Assistant instance.
- Record the API Key and URL, as these will be needed for integration.
Create a Zendesk App
- Log into your Zendesk account and go to the Admin Center.
- Navigate to the 'Apps and Integrations' section and click on 'Zendesk Apps'.
- Click 'New App' and fill out the necessary details such as the app name and description.
Configure the Zendesk App
- Set up the app with fields to enter the Watson Assistant API credentials obtained earlier.
- Ensure that the app includes UI components that will display Watson's responses or suggestions.
Integrate Watson Assistant with Zendesk
- Use the Watson Assistant API to connect your Watson Assistant instance to Zendesk. You'll be writing a middleware application.
- The middleware should intercept Zendesk tickets, then send the ticket content as input to Watson Assistant via its API.
- Process the response from Watson Assistant and use Zendesk's API to update the ticket or chat with a suitable response.
Sample Code for Middleware
import requests
def get_watson_response(assistant_id, session_id, text, apikey, url):
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {apikey}',
}
data = {
"input": {
"text": text
}
}
response = requests.post(f'{url}/v2/assistants/{assistant_id}/sessions/{session_id}/message', headers=headers, json=data)
return response.json()
Test the Integration
- Generate a ticket or a chat in Zendesk to ensure that Watson Assistant is correctly processing inputs and returning expected outputs.
- Check the middleware logs to confirm API calls and responses are occurring as expected.
Troubleshoot and Optimize
- Review logs for any errors or handling issues. Ensure API keys and URLs are correct and that permissions are adequately set in both systems.
- Continually refine the Watson Assistant dialog based on feedback and the types of queries received.
Maintain and Update the Integration
- Monitor updates from IBM Watson and Zendesk for any API changes that might affect the integration.
- Regularly update dialog skills in Watson to adapt to changing user needs and organizational changes.