Skip to content

Instantly share code, notes, and snippets.

@kmelve
Last active March 11, 2018 18:32
Show Gist options
  • Select an option

  • Save kmelve/af2a8f8e0a045ce62d731ddb69373505 to your computer and use it in GitHub Desktop.

Select an option

Save kmelve/af2a8f8e0a045ce62d731ddb69373505 to your computer and use it in GitHub Desktop.
Intent and fullfillment in Sanity
export default {
name: 'fullfillments',
title: 'Fullfillments',
description: 'Short texts that represent this content as chatbot fullfillments',
type: 'array',
of: [
{
type: 'string'
}
]
}
/*
* Intent schema for Sanity
*/
export default {
name: 'intent',
title: 'Intent',
type: 'document',
fields: [
{
name: 'title',
type: 'string',
description:
'Descriptive title that makes this intent easily identifiable',
title: 'Title'
},
{
name: 'intentName',
type: 'string',
title: 'Name of intent',
description:
'Maps intent to the chatbot with an identifier. E.g. “displayname” in Dialogflow'
},
{
name: 'fullfillments',
title: 'Fullfillments',
description: 'Choose the pages that contain answers to this intent',
type: 'array',
of: [
{
title: 'Short answers from existing content',
type: 'reference',
to: [
{
type: 'post'
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment