xMatters uses constants in scripting in a manner similar to variables (i.e., the constant name is abstracted from the constant value). Constants can be Global, applying across all Companies in an xMatters multi-tenancy deployment, or Company-specific, applying only to the Company for which they are defined.
An xMatters administrator creates a constant named "BES_URL" with a value representing the current BlackBerry Enterprise Server URL. The constant is then used in several xMatters scripting packages (i.e., the constant is used rather than the actual BES URL). If the server's URL changes, the administrator can simply modify the value of the BES_URL constant. The change will then be propagated to all instances of the BES_URL constant in the scripting packages.
If a Global Constant and a Company Constant have the same name, the value of the Company Constant overrides the value of the Global Constant for that Company. Additionally, Company Constants have independent values between Companies; multiple Companies can define a constant with the same name, but different values.
Similarly, if an Event Domain Constant has the same name as a Company Constant or a Global Constant, the value of the Event Domain Constant overrides the value of the other constants. Event Domain Constants also have independent values between Event Domains; multiple Event Domains in the same Company can define a constant with the same name, but assign different values.
| Note: | When an existing constant is modified, it takes five minutes for the change to be reflected in the scripts. |