Replies: 1 comment 1 reply
-
Hi @j-at-se! That's basically what this workflow does: https://cerb.ai/workflows/cerb.search.simple/ You can modify the query in that workflow so it searches ticket subjects, message content, participants, etc. Another interaction would be like this: start:
while:
if@bool: true
do:
set/initial:
elements:
text/prompt_query:
type: freeform
label: Search:
placeholder: (e.g. [email protected], #ABC-12345-678, Company Name, Worker)
default@key: prompt_query
outcome/isOrg@ref: isOrg
outcome/isEmail@ref: isEmail
outcome/isTicket@ref: isTicket
outcome/isWorker@ref: isWorker
var.push/submit:
inputs:
key: elements
value:
submit:
buttons:
continue/go:
label: Go
icon: search
icon_at: start
value: go
await/query:
form:
title: Smart Search
elements@key: elements
&isEmail:
if@bool: {{prompt_query is not prefixed ('#')}}
then:
data.query:
output: results
inputs:
query@text:
type:worklist.records
of:address
query:(${query} sort:-nonspam limit:20)
format:dictionaries
query_params:
query@key: prompt_query
outcome/notEmpty:
if@bool: {{results.data is not empty}}
then:
var.push:
inputs:
key: elements
value:
sheet/addresses:
label: Email Addresses
data@key: results:data
limit: 5
schema:
layout:
headings@bool: no
paging@bool: no
#filtering@bool: {{results._.paging.page.rows.of > 10}}
columns:
card/_label:
params:
image@bool: yes
bold@bool: yes
card/org_id:
params:
image@bool: yes
&isOrg:
if@bool: {{prompt_query is not prefixed ('#')}}
then:
data.query:
output: results
inputs:
query@text:
type:worklist.records
of:org
query:(${query} sort:name limit:20)
format:dictionaries
query_params:
query@key: prompt_query
outcome/notEmpty:
if@bool: {{results.data is not empty}}
then:
var.push:
inputs:
key: elements
value:
sheet/orgs:
label: Organizations
data@key: results:data
limit: 5
schema:
layout:
headings@bool: no
paging@bool: no
#filtering@bool: {{results._.paging.page.rows.of > 10}}
columns:
card/_label:
params:
image@bool: yes
bold@bool: yes
text/country:
&isTicket:
if@bool: {{prompt_query is prefixed ('#')}}
then:
data.query:
output: results
inputs:
query@text:
type:worklist.records
of:ticket
query:(mask:${mask} sort:-updated limit:20)
format:dictionaries
query_params:
mask: {{prompt_query[1:]}}*
outcome/notEmpty:
if@bool: {{results.data is not empty}}
then:
var.push:
inputs:
key: elements
value:
sheet/tickets:
label: Tickets
data@key: results:data
limit: 5
schema:
layout:
headings@bool: no
paging@bool: no
#filtering@bool: {{results._.paging.page.rows.of > 10}}
title_column: _label
columns:
card/_label:
params:
image@bool: yes
bold@bool: yes
card/initial_message_sender__label:
card/group__label:
text/status:
date/updated:
&isWorker:
if@bool: {{prompt_query is not prefixed ('#')}}
then:
data.query:
output: results
inputs:
query@text:
type:worklist.records
of:worker
query:(${terms} sort:-updated limit:20)
format:dictionaries
query_params:
terms: {{prompt_query}}
outcome/notEmpty:
if@bool: {{results.data is not empty}}
then:
var.push:
inputs:
key: elements
value:
sheet/workers:
label: Workers
data@key: results:data
limit: 5
schema:
layout:
headings@bool: no
paging@bool: no
#filtering@bool: {{results._.paging.page.rows.of > 10}}
columns:
card/_label:
params:
image@bool: yes
bold@bool: yes
text/title:
text/location: It searches multiple record types at once with a single plaintext query. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
My team is bringing up search in Cerb quite often now:
I would like to create a widget that when the user types in "example" the query is
messages:(content:"example") subject:"example" participant:(email:"example") participant:(contact:(firstName:"example")) participant:(contact:(email:("example"))) participant:(contact:(lastName:"example"))
And that it displays the results within the widget with pagination.
OR
A search button that brings up a card that behaves this way (I doubt this would be possible).
Beta Was this translation helpful? Give feedback.
All reactions