> To better understand programmatic commands, you can also try the following: open the Editor, click the three dots next to a command, and select Copy code. addCommand returns a promise, so you if you need to wait for it to complete, you can use await window.CommandBar.addCommand(...).
## Command action types
There are currently four different command action types:
Link: open a static or dynamic link
Callback: run a provided javascript function
Click: simulate a click or series of clicks in the DOM
Webhook: POST to a provided API endpoint
Context
- All data added to context goes through the CommandBar.addContext SDK method. Here are two very basic examples of adding data to context.
https://www.commandbar.com/docs/context/overview
Supply a search function: https://www.commandbar.com/docs/context/adding#supply-a-search-function-(records-only)