The Addigy Self Service application, called MacManage.app, provides the ability to send custom prompts to end-users.


Below is an example script that can be altered to fit the desired functionality.


#!/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;


The script above would produce the following prompt on a device.


Customization of Prompts

Description of script flags/attributes that can be altered:

  • title - the text within the "" can be altered to change the text the user sees. This would change the Test Prompt text seen in the screenshot above.
  • description - the text within the "" can be altered to change the text the user sees. This alters the "This is a test prompt" text seen in the screenshot above.
  • closeLabel - the text within the "" can be altered to change the text the user sees on the close (left most) button. This alters the text found on the button shown as Close in the screenshot above.
  • acceptLabel - the text within the "" can be altered to change the text the user sees on the accept (right most) button. This alters the text found on the button shown as Accept in the screenshot above.
  • timeout - the value given to this flag/attribute is in seconds. It can be altered to change the amount of time before the prompt automatically closes. A visual of this can be seen on the text "This window will close automatically in 5971 seconds." in the screenshot above, where the total seconds is what can be altered.
  • forefront(new in Self Service 1.0.21) - control if the prompt presented to the user comes to the foreground of their device or not. Valid values are true or false. When forefront is omitted, the notification will not come to the foreground. 



Additional Details

  • Omitting the closeLabel and acceptLabel flags/attributes will default the prompt to having only an OK button displayed to the user. Here is an example of a script and prompt with only the OK button used.
#!/bin/bash
/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" timeout=6000



  • Omitting the timeout flag/attribute additionally removed the automatic countdown timer of when the prompt will close, as well as not force close the prompt. The prompt will thus remain displayed to the user indefinitely until the user acknowledges it. Here is an example script and prompt without using a timeout. forefront=true will put the dialog on 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=true



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

if /Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="${title}" description="${description}" closeLabel="${closeText}" acceptLabel="${acceptText}" timeout="$timeOut"; 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
fi


The script above details how a command can be run based on the user's interaction with the prompt. The if statement returns true (exit 0) if the user clicks the Accept label and false (exit 1) if the user clicks the Close label.


Note that Self Service prompts are not blocked by Do Not Disturb being enabled on a device. 


If you have an Addigy account and have additional questions, you can create a ticket by emailing support@addigy.com.

Alternatively, you can submit a support request within Addigy.