Variable substitution system

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search

Return to user
documentation index

File Doc user.png

Return to developer
documentation index

File Doc dev.png

Substitution variables are keywords that can be used in many places in Dolibarr to be replaced later. It is used for example in the templates of emails or configuration text for a text to be personalized when it is displayed or sent for emails.

Substitution variables available

Variable Valeur Affichée Dolibarr Mini Note
__USER_ID__ -> 1 1
__USER_LOGIN__ doli9
__USER_LASTNAME__ SuperAdmin
__USER_FULLNAME__ -> SuperAdmin
__ID__ -> __ID__
__REF__ -> __REF__
__CONTRACT_HIGHEST_PLANNED_START_DATE__ -> Highest date planned for a service start
__CONTRACT_HIGHEST_PLANNED_START_DATETIME__ -> Highest date and hour planned for service start
__CONTRACT_LOWEST_EXPIRATION_DATE__ -> Lowest data for planned expiration of service
__CONTRACT_LOWEST_EXPIRATION_DATETIME__ -> Lowest date and hour for planned expiration of service
__ONLINE_PAYMENT_URL__ -> UrlToPayOnlineIfApplicable
__ONLINE_PAYMENT_TEXT_AND_URL__ -> TextAndUrlToPayOnlineIfApplicable
__SECUREKEYPAYMENT__ -> Security key (if key is not unique per record)
__SECUREKEYPAYMENT_MEMBER__ -> Security key for payment on a member subscription (one key per member)
__SECUREKEYPAYMENT_ORDER__ -> Security key for payment on an order
  • __SECUREKEYPAYMENT_INVOICE__ -> Security key for payment on an invoice
__SECUREKEYPAYMENT_CONTRACTLINE__ -> Security key for payment on a a service
__DIRECTDOWNLOAD_URL_PROPOSAL__ -> Direct download url of a proposal
__DIRECTDOWNLOAD_URL_ORDER__ -> Direct download url of an order
__DIRECTDOWNLOAD_URL_INVOICE__ -> Direct download url of an invoice. This needs that the setup INVOICE_ALLOW_EXTERNAL_DOWNLOAD is set to allow to generate the link.
__SHIPPINGTRACKNUM__ -> Shipping tacking number
__SHIPPINGTRACKNUMURL__ -> Shipping tracking url
__DATE_YMD__ -> __DATE_YMD__
__AMOUNT__ -> __AMOUNT__
__DAY__ -> 12
__DAY_TEXT__ -> Mardi
__MONTH__ -> 3
__MONTH_TEXT__ -> Mars
__YEAR__ -> 2019
__PREVIOUS_DAY__ -> 11
__PREVIOUS_YEAR__ -> 2018
__NEXT_DAY__ -> 13
__NEXT_MONTH__ -> 4
__NEXT_YEAR__ -> 2020
__(AnyTranslationKey)__ -> Translation
__[AnyConstantKey]__ -> Valeur de constante
__CONTACT_NAME_XXX__ -> XXX est le type de contact défini dans Accueil>configuration>dictionnaires>Types de contacts/adresses (par exemple : __CONTACT_NAME_BILING__ pour le contact client désigné comme responsable de la facturation sur une facture) Contient Titre+Nom+Prénom

Custom substitution variables