Addigy's Self Service application (MacManage.app) lets you send custom prompts to end users — handy for one-off reminders, required acknowledgments, or guiding a user through a multi-step process without needing a separate notification tool.
Overview
Here's an example script you can adapt to fit your own prompt:
#!/bin/bash
/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" closeLabel="Close" acceptLabel="Accept" timeout=6000 forefront=false;This produces the following prompt on a device:
Note: Self Service prompts are not blocked by Do Not Disturb, even if it's enabled on the device.
Customization Options for MacManage Notifications
Self Service notifications support customization in four areas:
- Text Content and Layout
- Buttons and User Actions
- Dynamic Content via Shell Command Expansion
- Visual Customization and Prompt Behavior
Text Content and Layout
Supported:
-
Title Text — the text inside the quotes for
titlechanges what the user sees as the bold heading (the "Test Prompt" text in the screenshot above). -
Description Text — the text inside the quotes for
descriptionchanges the body text (the "This is a test prompt" text above). - Line Breaks
- Unicode Characters
- Bullet Points
- Emojis
Not supported:
- Rich text formatting
- Font size or font style changes
- Clickable links within the description
- HTML, Markdown, or RTF
Example:
description="🚨 Action Required Next steps: • Review documentation • Complete required action • Click Continue when finished"
Buttons and User Actions
Supported:
- Up to two buttons per prompt
-
Custom button labels using
closeLabelandacceptLabel:-
closeLabelsets the text on the leftmost ("Close") button. -
acceptLabelsets the text on the rightmost ("Accept") button.
-
- Conditional scripting based on which button the user selects
-
Optional timeout behavior — the value given to
timeoutis in seconds, and controls how long before the prompt automatically closes. This is what produces the "This window will close automatically in N seconds" text shown to the user. -
Non-closable prompts using
closable=false— removes the close button entirely, leaving the prompt without one. Don't setcloseLabeloracceptLabelwhen using this. Valid values aretrueorfalse; whenclosableis omitted or set totrue, the notification defaults to a single "Ok" button.
Example: Single "OK" Button
Omitting closeLabel and acceptLabel defaults the prompt to a single OK button. Selecting OK returns exit code 1 (error), which you can use in an if statement:
#!/bin/bash
if /Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" timeout=6000; then
echo "User selected Ok"
exit 0
fiOmitting timeout also removes the automatic countdown and won't force-close the prompt — it stays on screen indefinitely until the user acknowledges it. Here's an example without a timeout (forefront=true brings the dialog to the top of the user's desktop):
#!/bin/bash
/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" forefront=trueExample with conditional logic based on the user's selection:
if MacManage action=notify ...; then # User selected acceptLabel else # User selected closeLabel or prompt timed out fi
Dynamic Content via Shell Command Expansion
Description text supports shell command substitution — commands inside $() run before the prompt displays, and their output is inserted as plain text.
Supported:
- Single commands
- Piped commands using
grep,awk, orsed - Variable expansion
- Filtered or formatted command output
Example
description="Device Info Hostname: $(hostname) User: $(whoami) macOS: $(sw_vers -productVersion)" description="Security Status FileVault: $(fdesetup status | head -n 1)"
Best Practices
- Keep output short and predictable
- Filter verbose commands
- Avoid slow or blocking commands
- Expect plain text output only
Visual Customization and Prompt Behavior
Supported:
- Custom Self Service logo via a deployed
.icnsfile -
Forefront — controls whether the prompt comes to the foreground of the user's device. Valid values are
trueorfalse; when omitted, the notification will not come to the foreground.
Not supported:
- Custom fonts
- Color changes
- Layout or spacing changes
Complete Reference Example
This example demonstrates a full Self Service notification script using plain-text layout with bullets and emojis, two buttons (FAQ and Continue), a required acknowledgment flow, and external documentation access via a button.
#!/bin/bash
# Custom MacManage Prompt Template
# Two button prompt using FAQ and Continue
#
# Notes
# - MacManage prompts support plain text only
# - Line breaks work
# - Unicode works (bullets and emojis)
MacManage="/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage"
# Editable variables
Title="Title Here"
FAQ_URL="https://example.com/faq"
FAQ_ButtonLabel="FAQ" # Left button (closeLabel)
Continue_ButtonLabel="Continue" # Right button (acceptLabel)
TimeoutSeconds=600
BringToFront=true
Description="🚨 Action Required
Please complete the following steps:
• Step 1: Open the FAQ for instructions
• Step 2: Follow the enrollment steps
• Step 3: Return here and click Continue
"
# Prompt loop
# - Continue returns exit code 0 and exits the script
# - FAQ returns a non-zero exit code, opens the URL, then re-prompts
# - Timeouts also return non-zero and will follow the same path
while true; do
"$MacManage" action=notify \
title="$Title" \
description="$Description" \
closeLabel="$FAQ_ButtonLabel" \
acceptLabel="$Continue_ButtonLabel" \
timeout="$TimeoutSeconds" \
forefront="$BringToFront"
rc=$?
if [[ $rc -eq 0 ]]; then
exit 0
fi
/usr/bin/open "$FAQ_URL"
doneNote: Self Service doesn't distinguish between a user clicking the close button and the prompt timing out — both return a non-zero exit code. If you don't want the FAQ to open on timeout, remove the timeout or set it to a high value.
Example: Customized Prompt with Variables
#!/bin/bash
# Adjust these variables as they will replace the text in the flags
title="A Notification"
description="Example of a description text"
acceptText="Accept"
closeText="Close"
timeOut=600
forefront="False"
if /Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="${title}" description="${description}" closeLabel="${closeText}" acceptLabel="${acceptText}" timeout="$timeOut" forefront="$forefront"; then
# executes a desired command if the user clicks the Accept label.
echo "Accept label clicked"
exit 0
else
# executes a desired command if the user clicks the Close label.
echo "Close label clicked"
exit 1
fiThis script runs a command based on how the user interacts with the prompt. The if statement returns true (exit 0) if the user clicks Accept, and false (exit 1) if the user clicks Close.