
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@coveops/case-context-trigger
Advanced tools
The CaseContextTrigger component renders **ONLY** if a Trigger Rule has been added into the corresponding query pipeline. The Trigger Rule must be an ``Execute`` Rule that will call the following JavaScript Function:
The CaseContextTrigger component renders ONLY if a Trigger Rule has been added into the corresponding query pipeline.
The Trigger Rule must be an Execute Rule that will call the following JavaScript Function:
CaseContextTrigger(notification_msg, case_number, case_subject)
Note: This Trigger Rule should ALWAYS be associated to a condition related to the current Context and you also do not want to see that notification if the query is not empty.
This component will allow you to execute CaseContextTrigger JavasScript Function from a Trigger Rule in your pipeline.
When the Trigger Rule is being executed, depending on its current mode (Large or Small), this component renders a Banner (Large mode)
or a Badge (Small mode) based on the infos passed to the JavaScript Function in order to notify the user that current query is using a certain context.
When caseNumber and/or caseSubject options are undefined, parameters case_number and case_subject that are passed
to the CaseContextTrigger Function will be considered as Key value of the current Context Object which mean the Subject that will be
displayed in the Banner will be the result of Context[case_subject].
| CaseContextTrigger (Large Mode) |
|---|
| CaseContextTrigger (Small Mode) |
|---|
npm i @coveops/case-context-trigger
Typescript:
import { CaseContextTrigger, ICaseContextTriggerOptions } from '@coveops/case-context-trigger';
Javascript
const CaseContextTrigger = require('@coveops/case-context-trigger').CaseContextTrigger;
export * from '@coveops/case-context-trigger'
Add the following markup to your template:
<div class="CoveoCaseContextTrigger"></div>
The following options can be configured:
| Option | Required | Type | Default | Notes |
|---|---|---|---|---|
notificationMsg | No | localized string | CaseContextTrigger_NotificationMsg | Specifies the notification message of the Case Context Banner. |
enableNotificationMsg | No | boolean | true | Specifies whether to display the notification message in the Case Context Banner when large mode is activated. |
caseNumber | No | string | | Specifies the case Number that will be displayed in the Case Context Banner. |
caseSubject | No | string | | Specifies the case Subject / title that will be displayed in the Case Context Banner. |
enableResponsiveMode | No | boolean | true | Specifies whether to enable responsive mode for CaseContextTrigger |
Extending the component can be done as follows:
import { CaseContextTrigger, ICaseContextTriggerOptions } from "@coveops/case-context-trigger";
export interface IExtendedCaseContextTriggerOptions extends ICaseContextTriggerOptions {}
export class ExtendedCaseContextTrigger extends CaseContextTrigger {}
.env.dist to .env and update the COVEO_ORG_ID and COVEO_TOKEN fields in the .env file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.npm run buildnpm run serveFAQs
The CaseContextTrigger component renders **ONLY** if a Trigger Rule has been added into the corresponding query pipeline. The Trigger Rule must be an ``Execute`` Rule that will call the following JavaScript Function:
We found that @coveops/case-context-trigger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.