Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ compile:

deployment:
development:
branch: dev
branch: [dev, feature/chatbot-product-type]
owner: appirio-tech
commands:
- ./deploy.sh DEV
Expand Down
21 changes: 21 additions & 0 deletions src/assets/images/product-chatbot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
257 changes: 257 additions & 0 deletions src/config/projectQuestions/ibm_chatbot.v1.0.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
import _ from 'lodash'
// import { Icons } from 'appirio-tech-react-components'
import { findProduct} from '../projectWizard'

const isFileRequired = (project, subSections) => {
const subSection = _.find(subSections, (s) => s.type === 'questions')
const fields = _.filter(subSection.questions, q => q.type.indexOf('see-attached') > -1)
// iterate over all seeAttached type fields to check
// if any see attached is checked.
return _.some(_.map(
_.map(fields, 'fieldName'),
fn => _.get(project, `${fn}.seeAttached`)
))
}

const sections = [
{
id: 'appDefinition',
title: (project, showProduct) => {
const product = _.get(project, 'details.products[0]')
if (showProduct && product) {
const prd = findProduct(product)
if (prd) return prd
}
return 'Definition'
},
required: true,
description: 'Please answer a few basic questions about your project. You can also provide the needed information in a supporting document--add a link in the notes section or upload it below.',
subSections: [
{
id: 'projectName',
required: true,
validationError: 'Please provide a name to your project',
fieldName: 'name',
description: '',
title: 'Project Name',
type: 'project-name'
},
{
id: 'questions',
required: true,
hideTitle: true,
title: 'Questions',
description: '',
type: 'questions',
questions: [
{
icon: 'question',
title: 'Are you an existing Watson Virtual Assistant customer?',
description: '',
fieldName: 'details.appDefinition.existingWatsonCustomer',
type: 'checkbox',
options: [
{value: 'true', title: 'Yes'},
{value: 'false', title: 'No'},
]
},
{
id: 'projectInfo',
required: true,
fieldName: 'description',
description: 'Brief Description',
title: 'Description',
type: 'textbox'
},
{
icon: 'question',
title: 'Do you have an existing IBM Bluemix account?',
description: '',
type: 'radio-group',
fieldName: 'details.appDefinition.hasBluemixAccount',
options: [
{value: 'true', label: 'Yes'},
{value: 'false', label: 'No'}
]
},
{
icon: 'question',
title: 'What capabilities does the chatbot need to support? (check all that apply)',
description: '',
type: 'checkbox-group',
fieldName: 'details.appDefinition.capabilities',
options: [
{value: 'order_management', label: 'Order Management'},
{value: 'information', label: 'Information'},
{value: 'help', label: 'Help'},
{value: 'complaints', label: 'Complaints'},
{value: 'billing', label: 'Billing'},
{value: 'account_management', label: 'Account Management'},
{value: 'custom', label: 'Custom'}
],
},
{
icon: 'question',
title: 'Will the chatbot need to provide data from any systems to support the capabilities you listed above?',
description: '',
type: 'radio-group',
fieldName: 'details.appDefinition.integrationSystems',
options: [
{value: 'true', label: 'Yes'},
{value: 'false', label: 'No'}
]
},
{
icon: 'question',
title: 'Do you have existing agent scripts?',
description: '',
type: 'radio-group',
fieldName: 'details.appDefinition.existingAgentScripts',
options: [
{value: 'true', label: 'Yes'},
{value: 'false', label: 'No'}
]
},
{
icon: 'question',
title: 'Are you planning to transfer conversations to human agents?',
description: '',
type: 'radio-group',
fieldName: 'details.appDefinition.transferToHumanAgents',
options: [
{value: 'true', label: 'Yes'},
{value: 'false', label: 'No'}
]
}
]
},
{
id: 'notes',
fieldName: 'details.appDefinition.notes',
title: 'Notes',
description: 'Add any other important information regarding your project (e.g., links to documents or existing applications, budget or timing constraints)',
type: 'notes'
},
{
id: 'files',
required: isFileRequired,
title: (project) => `Project Files (${_.get(project, 'attachments', []).length})` || 'Files',
description: '',
type: 'files',
fieldName: 'attachments'
}
]
}
]

export default sections

export const basicSections = [
{
id: 'appDefinition',
title: '',
required: true,
description: 'Please answer a few basic questions about your project and, as an option, add links to supporting documents in the “Notes” section. If you have any files to upload, you’ll be able to do so later.',
subSections: [
{
id: 'projectName',
required: true,
validationError: 'Please provide a name to your project',
fieldName: 'name',
description: '',
title: 'Project Name',
type: 'project-name'
},
{
id: 'questions',
required: true,
hideTitle: true,
title: 'Questions',
description: '',
type: 'questions',
questions: [
{
id: 'projectInfo',
required: true,
fieldName: 'description',
description: 'Brief Description',
title: 'Description',
type: 'textbox'
},
{
icon: 'question',
required: true,
title: 'Are you an existing Watson Virtual Assistant customer?',
description: '',
fieldName: 'details.appDefinition.existingWatsonCustomer',
type: 'radio-group',
options: [
{value: 'true', label: 'Yes'},
{value: 'false', label: 'No'},
]
},
{
icon: 'question',
required: true,
title: 'Do you have an existing IBM Bluemix account?',
description: '',
type: 'radio-group',
fieldName: 'details.appDefinition.hasBluemixAccount',
options: [
{value: 'true', label: 'Yes'},
{value: 'false', label: 'No'}
]
},
{
icon: 'question',
// required: true,
title: 'What capabilities does the chatbot need to support?',
description: '',
type: 'checkbox-group',
fieldName: 'details.appDefinition.capabilities',
options: [
{value: 'order_management', label: 'Order management'},
{value: 'information', label: 'Information'},
{value: 'help', label: 'Help'},
{value: 'complaints', label: 'Complaints'},
{value: 'billing', label: 'Billing'},
{value: 'account_management', label: 'Account management'},
{value: 'custom', label: 'Custom (please explain in the Notes)'}
],
},
{
icon: 'question',
required: true,
title: 'Will the chatbot need to access data from any systems to support the capabilities you listed above? If so, please list the systems below. (Change to text box)',
description: '',
type: 'textbox',
fieldName: 'details.appDefinition.integrationSystems'
},
{
icon: 'question',
required: true,
title: 'Do you have any example agent conversations you can provide? If so, please paste them or any links to documents below (you’ll be able to upload documents later).',
description: '',
type: 'textbox',
fieldName: 'details.appDefinition.existingAgentScripts'
},
{
icon: 'question',
required: true,
title: 'Are you planning to transfer conversations to human agents? If so, please list the agents’ communication tools (e.g., Slack, LiveAgent, Intercom, etc.)',
description: '',
type: 'textbox',
fieldName: 'details.appDefinition.transferToHumanAgents'
}
]
},
{
id: 'notes',
fieldName: 'details.appDefinition.notes',
title: 'Notes',
description: 'Add any other important information regarding your project (e.g., links to documents or existing applications, budget or timing constraints)',
type: 'notes'
}
]
}
]
1 change: 1 addition & 0 deletions src/config/projectSpecification/typeToSpecification.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"visual_prototype": "app_dev.v1.0",
"website_development": "app_dev.v1.0",
"application_development": "app_dev.v1.0",
"watson_chatbot": "ibm_chatbot.v1.0",
"generic_dev": "app_dev.v1.0"
}
7 changes: 7 additions & 0 deletions src/config/projectWizard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ const products = {
icon: 'product-app',
id: 'application_development'
},
'Watson Chatbot': {
brief: 'Watson Chatbot',
details: 'Build Chatbot using IBM Watson',
icon: 'product-chatbot',
id: 'watson_chatbot',
hidden: true
},
'Software Development': {
brief: 'Tasks or adhoc',
details: 'Get help with any part of your development cycle',
Expand Down
3 changes: 2 additions & 1 deletion src/projects/create/components/SelectProduct.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function SelectProduct(props) {
for(const subType in subTypes) {
const item = subTypes[subType]
// don't render disabled items for selection
if (item.disabled) continue
// don't render hidden items as well, hidden items can be reached via direct link though
if (item.disabled || item.hidden) continue
const icon = <SVGIconImage filePath={item.icon} />
cards.push(
<ProductCard
Expand Down