MEP Expression Language
Scope Reference
There are a number of different scopes in the EL, some of which you can use to create your own variables. This page explains which scopes exist, whether you can use the scope for custom variables, and whether built-in variables exist that use the scope.
Service and system scopes
In the following table, the Custom and Built-in columns indicate if you can create your own (custom) variables using the scope and if there are built-in variables available.
End user orientated scopes
These scopes are associated with an end user and their use of your services.
In the table, the Custom and Built-in columns indicate if you can create your own (custom) variables using the scope and if there are built-in variables available.
Scope |
Description |
Custom |
Built-in |
---|---|---|---|
user
|
The variable value is associated with a specific end user across all of your services and collections. This means that each user has their own unique instance of the variable, shared across all your services. User variables support unicode values. The maximum length is 4096 unicode characters. Note that you cannot create a custom user.identifiers variable (e.g. user.identifiers.xxx). This range of variables is restricted to existing and future built-in variables. You can use variables with this scope in the Services, Subscriptions and Broadcasts tabs.. |
Yes
|
Yes |
userservice
|
The variable value is associated with a particular end user for a particular service. The same variable value is used whenever that end user accesses the service, but not if the user accesses a different service. Userservice variables support unicode values. The maximum length is 4096 unicode characters. You can use variables with this scope in the Services tab only. |
Yes
|
No
|
userservicecoll
|
The variable value is associated with a specific end user for all services within the same collection. Userservicecoll variables support unicode values. The maximum length is 4096 unicode characters. You can use variables with this scope in the Services tab only. |
Yes |
No |
Upload scope (broadcasting only)
The upload scope is available in the Broadcasts tab only. Upload variables reference customer-linked data uploaded via a CSV file. Once the data is uploaded, you can reference the upload variables in the broadcast message.
Upload variables are created from the columns in a CSV file. The first column in the CSV must contain the mobile numbers of your customers. Each column after the first column becomes accessible via upload variables.
For example, in the following table, the column headings become the variable key and each cell becomes the value of the variable for that customer.
MSISDN |
firstname |
offer |
PIN |
---|---|---|---|
447700900750 |
Beth |
cappuccino |
54321 |
447700900765 |
John |
mug |
43215 |
447700900912 |
Samuel |
t-shirt |
32154 |
In this example, the variables are: upload.firstname, upload.offer, and upload.PIN.
If your CSV file does not have headings, then MEP will automatically create a variable, which you can rename when using the upload interface.
You can only use upload variables when you upload a CSV file. The variables only exist for the specific broadcast; you cannot reference them in a different broadcast or in other areas of MEP. If you reuse a broadcast, then you will need to upload the same CSV file to add the mobile number and variable information again.