FAQ Q204: Quelles tags puis-je utiliser pour représenter les données spécifiques aux réservations ?

Section: Templates, tags and CSS styles
In all templates which have access to reservation details (e.g. customized messages, invoice, shopping cart contents) you can use the following tags which represent values specific to given reservation. You can use these tags no matter if you are editing the template in WYSIWYG or HTML mode. Tags whose value is empty will be replaced with empty text. You can easily test the tags in the tag playground.

Basic reservation data

Tag nameMeaning
$(rental_id) or $(reservation_id)ID of the reservation
$(resource_id)ID of the resource reserved
$(status)Status of the reservation
$(status_long)Reservation status described in a long sentence with explanations as to what the next steps are.
$(status_code)Numerical value of the status (more...)
$(reservation_confirmed), $(reservation_cancelled), $(reservation_admin_cancelled), $(reservation_user_cancelled), $(reservation_completed), $(reservation_conflict), $(reservation_checked_in), $(reservation_checked_out), $(reservation_locked)Equals Yes when the reservation has given status (confirmed, cancelled by anyone, cancelled by admin, cancelled by user, completed, conflict, checked in, checked out), or No otherwise
$(unit_name), $(unit_name:X)Name of the unit chosen. If more than one unit is chosen, the first version will list all units (comma-separated) whereas the second version lets you get each individual unit name, e.g. $(unit_name:2) will return the second unit chosen for the reservation.
$(number_of_persons)Total number of persons. If you have a per-person section, you can use this tag in an iterator, e.g. for a form field called abc: $(foreach:$(number_of_persons)) $(prop_abc_$(it)) $(endfor) would list the values of abc for each person.
$(rental_color), $(rental_color_description)Color assigned to the reservation by the admin. The first tag returns the color (value which can be used in a css style) while the second tag returns the custom text associated with given color (if defined for your planyo site).
Possible values for the $(rental_color) tag are: #A8314F #33FF33 #4D4DFF yellow #B84DFF #999999 #81FCF6 #FFBAF1 #DADAD2 #ECDC81 #CEF0FF #D1FFB3 #FFA4A4
$(admin_notes)Administrator's notes for given reservation. WARNING! This normally contains private notes regarding the reservation or the client. Use only when required by your model.
$(user_notes)Notes entered by the client at the time of reservation
$(quantity)Number of resources (or when sharing is enabled, number of persons)
$(ticket_number)Quantity previously reserved for the same time as this reservation. This can be interpreted as the ticket number in case of resources with sharing always allowed.
$(ticket_count)Total quantity reserved for the same time as this reservation. This can be interpreted as the total number of tickets sold in case of resources with sharing always allowed.
$(wants_share)For resources which can be shared or not, this is true if sharing was chosen, otherwise it will be empty
$(prop_xxx)One of the custom items in your reservation form. You'll need to replace spaces with underscore character, e.g. $(prop_Wants_breakfast) for the form item 'Wants breakfast'. Any non-alphanumeric characters also need to be replaced with underscores. The tag variation $(user_lang_prop_xxx) will give you the translated value in case the form item is of type dropdown or checkbox. You can also use the tag $(prefixed_prop_xxx) which will return the first non-empty value of an item with the specified prefix.

See the table at the bottom of this page for possible property tags. Note that for checkbox items, if the checkbox was selected, the value will be Yes, otherwise it will be empty.
$(custom_property_count), $(custom_property_name:x), $(custom_property_value:x)Tags which allow you to get all the custom reservation form items for given reservation. Usually they should be used with the $(foreach:xxx) tag, see the explanation of the foreach tag in the description of the $(reservation_payment_count) tag.
$(reservation_details)All details of the reservation in form of a UL tag with multiple LI entries. This tag can be created using multiple simple tags (see Q277 for more about this) but is a convenient way to quickly list all reservation details.
$(participant_csv_xxx)Comma-separated values of the field xxx found inside a per-participant section. Useful if you want to get the values of a field for all participants in a single text. This is especially useful e.g. if you want to send an email to all participants -- in such case you'd use this tag in the BCC field of your email notification to get the value of the participant email field.
$(refcode)If referer code was used as a source for the reservation (ppp_refcode parameter in widgets or attribute string), this will give the code used.
$(package_assignment:N), $(package_assignment_name:N), $(package_assignment_resource_admin_email:N), $(package_assignment_prop_res_XXX:N), $(package_assignment_starting_times:N)For package reservations, these tags give you info about the package assignment in the Nth category (for simple packages N should always be equal to 1, use higher numbers for flexible packages with multiple categories). The first tag gives the ID of the resource included in the package. The second one gives the resource name and the third gives the email address of the user who's the admin of this resource. The tag $(package_assignment_prop_res_XXX:N) lets you access any custom resource property.
$(commission)When the site is using the commission-based model (PRO-COMM), this is the commission due for the reservation.
$(resource_rating_submitted), $(resource_rating_submitted_text), $(resource_rating_submitted_stars)When a review was submitted for the reservation, the value of $(resource_rating_submitted) will be Yes, otherwise it will be empty. The two other tags will include the review text and the star rating.

Information about the customer

Tag nameMeaning
$(first_name)Client's first name
$(last_name)Client's last name
$(email)Client's email address
$(user_id)Client's unique user ID in planyo
$(address)Client's address (without country)
$(country), $(country_code)Client's country (full name) and the 2-letter country code.
$(street)Client's street
$(city)Client's city
$(state)Client's state/province
$(zip)Client's ZIP (postal) code
$(phone)Client's phone numbers (land and/or mobile)
$(phone_fixed)Client's land phone number
$(phone_mobile), $(phone_mobile_number), $(phone_mobile_country_code)Client's mobile number. The first version shows the entire number including the country code in parenthesis, the 2nd tag shows the number only and the 3rd shows the country code only
$(phone_plus), $(phone_fixed_plus), $(phone_mobile_plus)Same as the versions without _plus but these versions use the format +CCNNNNN instead of (CC) NNNNN
$(user_language), $(user_language_code)Client's language (full word or a 2-letter ISO 639-1 code)
$(language)Currently chosen language
$(user_preapproved), $(user_banned)Yes if the user is preapproved/banned or No otherwise
$(prev_reservation_count), $(other_reservation_count)Total number of valid reservations made previously (first version) or also later (second version) by the same customer for any resource of this site
$(user_noshow_count)Total number of no-show reservations made by the customer
$(ip_address)IP address used by the customer when making the reservation
$(user_login)If the client has a planyo login, this tag will print it - also in case the client is not currently logged in (see the tag $(is_user_logged_in) in Q206 for this functionality)
$(prop_user_xxx)If you assign any custom properties to your clients, you can also get these values using tags with this prefix.

Date and time

Tag nameMeaning
$(rental_time)Text representing the whole duration of the rental, e.g. Friday 3pm - 5pm
$(start_time)Beginning of the rental (time)
$(start_date)Beginning of the rental (date)
$(end_time)End of the rental (time)
$(end_date)End of the rental (date)
$(creation_date)Date when the reservation was entered into the system
$(creation_timestamp)Time and date when the reservation was entered into the system (in the timestamp format, see Q221 for timestamp-related tags)
$(rental_days)Duration (in full days) of the rental
$(rental_hours)Duration (in full hours) of the rental, e.g. for a 90-minute rental, this will be 1. If you need a fractional value, such as 1.5, use the tag: $(calc:$(rental_minutes) / 60)
$(rental_minutes)Duration (in minutes) of the rental
$(rental_duration)Duration of the rental as text (works with minutes/hours/days/weeks)
$(prop_rental_duration_text)If the resource has predefined duration values, this will be replaced with the duration item chosen by the customer
$(days_until_rental), $(hours_until_rental)Number of days or hours until the beginning of the rental. The first tags will return only full days, that is, independently of the time when the rental starts (if hour-based) and of the current time, if the start date is tomorrow, the tag will always give the value of 1. The second one will give the number of hours until rental, rounded to 1 decimal point, e.g. 0.5 if the rental starts in 30min. Note that the value can be negative if the rental has already started.
$(date)Today's date
$(start_timestamp), $(end_timestamp)Beginning and end of the rental expressed as timestamp (seconds since 01.01.1970)
$(utz_offset), $(utz_rental_time), $(utz_start_time), $(utz_start_timestamp), $(utz_start_date), $(utz_end_time), $(utz_end_timestamp), $(utz_end_date), $(utz_creation_date), $(utz_creation_timestamp)If you're working with different customer time zones (see Q296), these tags will return time information using customer's time zone, see the equivalent tags without the utz_ prefix for clarifications. The tag $(utz_offset) returns customer's timezone offset expressed in hours of difference from UTC.

Pricing and payments

Tag nameMeaning
$(price_quoted), $(net_price_quoted), $(tax_quoted)Rate quoted for the reservation. The first tag includes the tax, the second one is the net price, and $(tax_quoted) is the total tax
$(discount)Discount applied (e.g. through a voucher or by the admin)
$(price_no_discount)Original price (without taking under consideration the voucher used or other discount, if present)
$(deposit), $(cart_deposit)Deposit to be paid for the reservation (pre-payment amount). Use $(deposit) for single reservations and $(cart_deposit) if you're using the shopping cart. Another variation, $(default_deposit) can be used to print the amount based on the default pre-payment amount rules for given resource (as set in resource settings).
$(rental_tax_rate)Tax rate for this rental (in percent).
$(product_price), $(net_product_price)Total price of the additional products, excluding custom products. The second version returns the price without tax (net).
$(price_without_products), $(net_price_without_products)Base price without additional products. This is equal to: $(price_quoted) - $(product_price). The second version returns the price without tax (net).
$(price_without_all_products), $(net_price_without_all_products)Base price without additional and custom products. This is equal to: $(price_quoted) - $(product_price) - $(custom_product_price). The second version returns the price without tax (net).
$(amount_paid)Amount paid already
$(amount_outstanding)Amount left to be paid
$(online_payment_amount)Amount of the online payment (pre-payment / deposit) needed to confirm the reservation
$(online_payment_surcharge), $(cart_items_payment_surcharge)Online payment surcharge paid (if using the shopping cart, the first tag returns the surcharge paid only for one reservation in a shopping cart, the second one will always return it)
$(payment_form:XXX)Displays the payment form directly in place of this tag. You'll need to specify the amount in place of XXX (other tags can be used here). You should only use these tags for templates which are shown on your website. Do not use them for emails - use $(payment_form_url) instead as most email programs will not allow forms in email body. To ask for the outstanding amount, use $(payment_form:$(amount_outstanding))
$(reservation_payment_count), $(reservation_payment_date:N), $(reservation_payment_time:N), $(reservation_payment_amount:N), $(reservation_payment_comment:N), $(reservation_payment_mode:N), $(reservation_payment_status:N), $(reservation_payment_id:N), $(reservation_payment_admin_id:N), $(reservation_payment_admin_name:N)These tags give you detailed information about payments made for given reservation. $(reservation_payment_count) returns the number of payments (only successful payments and refunds are counted) and the other tags give details about each payment (N is the payment number), for example: $(reservation_payment_id:1) will return the transaction ID for the first payment. $(reservation_amount_2) will give you the amount (including currency) of the 2nd payment etc. $(reservation_payment_status:N) will give you one of the following statuses: paid, pending, error. Here's a code snippet you can use to output all payments (see the explanation of the foreach tag below):
$(foreach:$(reservation_payment_count))
$(reservation_payment_mode:$(it)) $(reservation_payment_amount:$(it))
$(endfor)
$(resource_currency)Resource currency
$(price_breakdown)Displays the price breakdown
$(is_applied_rule_number:X), $(get_applied_rule_number:X), $(applied_rule_count), $(applied_rule_first_date:N), $(applied_rule_last_date:N), $(applied_rule_type:N), $(applied_rule_name:N), $(applied_rule_comment:N), $(applied_rule_condition:N), $(applied_rule_condition2:N), $(applied_rule_subtype:N), $(applied_rule_multiplier:N), $(applied_rule_value:N), $(applied_rule_unit_type:N), $(applied_rule_unit_price:N), $(applied_rule_price_before:N), $(applied_rule_price_after:N), $(applied_rule_price_diff:N), $(applied_rule_row_number:N)You can use these tags to extract information about the pricing manager rules which were applied in price calculation. This can be useful e.g. if you want to highly customize the invoice template. $(is_applied_rule_number:X) will be non-empty if rule number X in Pricing Manager was applied. Otherwise it's empty text. $(get_applied_rule_number:X) returns the index of the applied rule for given rule number, to be used with the $(applied_xxx) tags, so you can use it this way: $(applied_rule_price_after:$(get_applied_rule_number:3)) which will give you the price calculated after rule number 3 in pricing manager. If rule number 3 was ignored, this will give you empty text. Note: in case you modify your rules frequently and your rule numbers change a lot, you can use rule's permatag instead of the rule number (e.g. $(get_applied_rule_number:ABC)). You'll find the permatag corresponding to each rule in Pricing Manager after clicking on the Reorder button. The permatag is a tag composed of letters and will never change for given rule-- it will stay the same if you reorder the rules or if you edit a rule.
The following rules are useful to iterate through all applied rules. $(applied_rule_count) will give you the total number of rules applied for given reservation. You can use the $(foreach:xxx) tag described in this FAQ question to iterate through all the rules. Unit type and rule type are integers (here are the rule type values: 1=weekday, 2=date, 3=duration, 4=quantity, 5=num. persons, 6=form item, 7=hour, 8=additional persons, 9=time left, 10=start date, 11=start hour, 12=start weekday, 13=end weekday, 14=additional days, 15=end date, 16=date with year, 17=start date with year, 18=user property, 19=sharing, 20=daily pricing, 21=end hour, 22=additional hours, 23=price, 24=season of start date, 25=always true, 26=season, 27=voucher, 28=csv, 29=add. adults, 30=add. children, 31=time until rental end, 32=places left). Condition and condition2 will give you the rule-specific condition(s). Subtype is used for form items and properties and determines the property name or form item name. Unit price is the price entered into given pricing manager cell. Price before and after give you the price calculated before and after the rule is applied and diff is the difference between the two.
$(voucher_used)Voucher code if a voucher was applied to the reservation, otherwise replaced with an empty text.
$(voucher_discount)Discount applied through a voucher (if any).
$(voucher_title)If a voucher was applied and it has a title associated with it, then this is the title of the voucher applied. Note this will work only when the voucher is still present on the Vouchers configuration page.
$(voucher_original_discount)If a voucher was applied, this is the discount as defined in the voucher's settings (e.g. 20 or 25%). Note this will work only when the voucher is still present on the Vouchers configuration page.
$(coupon_used), $(coupon_used_type_pretty), $(coupon_used_amount), $(coupon_used_amount_left), $(coupon_used_last_load_amount)If a coupon was applied to the reservation, the first tag will return non-zero (numeric) coupon type, the second a pretty name of the type (e.g. Prepaid amount), the third the amount the coupon was charged, the next one the remaining coupon's amount that still can be used and the last one the latest amount the coupon was loaded.
$(customer_coupon_count), $(customer_coupon_amount_left:N), $(customer_coupon_type:N), $(customer_coupon_type_pretty:N), $(customer_coupon_access_type:N), $(customer_coupon_access_code:N), $(customer_coupon_other:N), $(customer_coupon_expiry:N), $(customer_coupon_price:N), $(customer_coupon_invoice_url:N), $(customer_coupon_number_used), $(customer_coupon_buyer_info:N), $(customer_coupon_additional_buyer_info:N) These tags give you detailed information about coupons owned by the customer. $(customer_coupon_count) returns the number of valid coupons and the other tags give details about each coupon (N is the coupon number), for example: $(customer_coupon_amount_left:1) will return the amount left for the first listed coupon, $(customer_coupon_type:2) will return the type of the 2nd coupon etc. $(customer_coupon_type_other:N) will give extra information about the coupon, e.g. validity period if any. You can use $(customer_coupon_number_used) in place of the coupon number (N) to get information about the coupon used for this reservation, e.g. $(customer_coupon_type_pretty:$(customer_coupon_number_used)).
Here's a code snippet you can use to output all coupons (see the explanation of the foreach tag below):
$(foreach:$(customer_coupon_count))
$(customer_coupon_type_pretty:$(it)) $(customer_coupon_amount_left:$(it))
$(endfor)
$(parent_invoice_sequential_number)Sequential number of the parent invoice generated for the reservation
$(invoice_count), $(invoice_creation_date:x), $(invoice_sequential_number:x), $(invoice_id:x), $(invoice_total_price_gross:x), $(invoice_total_price_net:x), $(invoice_total_tax:x), $(invoice_amount_paid:x)These tags let you iterate through all invoices of the reservation. The first tag returns the total count and the other tags give you values for a specific invoice (numbered 1, 2, ..)

Event log and modifications

Tag nameMeaning
$(creation_moderator)Moderator name if the reservation was entered by a moderator. If not, an empty text is returned. You can also use $(creation_moderator_email) to get their email address
$(creation_website)If the reservation was made online by the customer using advanced integration, then this tag will return the domain name of the website where the reservation was made. If the reservation was made via one of the extensions, such as booking.com, TripConnect from TripAdvisor etc., this will also indicate the source of the reservation. In case of API reservations, the value will be API. In all other cases it will be an empty text.
$(creation_device)Device used to create the original reservation (set only when reservation created by the customer). One of: desktop, tablet, mobile, or empty text if it cannot be determined.
$(creation_metasite_id)If the reservation was created in the context of a meta site (either using advanced integration or by the metasite admin), this will return the metasite id. Otherwise (when no meta site context can be found, for example when the site admin entered the reservation) this will be an empty text.
$(added_by_agent)If the reservation was entered by an agent, true is returned. If not, the tag returns an empty text.
$(agent_name), $(agent_email)If the reservation was entered by an agent, these tags return the agent's first and last name (first tag) or their email address (second tag).
$(agent_id)If the reservation was entered by an agent, the tag returns the agent's user ID.
$(agent_discount_rate), $(agent_products_discount_rate), $(agent_commission_rate)If the reservation was entered by an agent, these are the agent's discount and commission rates.
$(was_in_waiting_list)Yes if the reservation was previously in a waiting list, otherwise the value will be set to No
$(waiting_list_position)If the reservation is on the waiting list, this tag will show the number on the list; if not on a waiting list, it's value is 0
$(cancellation_reason), $(cancellation_date), $(cancellation_time), $(cancellation_event_present)If reservation has been cancelled, the reason entered by admin or customer is printed, or the cancellation date in case of $(cancellation_date) / or date in time in case of $(cancellation_time). If reservation is not cancelled, nothing is printed. The tag $(cancellation_event_present) prints Yes if the reservation was previously cancelled (even if the current status is no longer cancelled) or No otherwise.
$(last_modification_comment), $(last_modification_date), $(last_modification_changes), $(last_modification_admin_name), $(last_modification_admin_id)If reservation was modified (by an admin or customer), you can print the modification comment or date (last one in case multiple modifications were made). The last two tags will be empty if the modification was done by the customer, or else will print the administrator who made the modification.
$(last_price_update_comment)After an admin/customer modification or a modification of additional products, this tag will be replaced with the information about the last price update event
$(checkin_admin_id), $(checkin_admin_name), $(checkout_admin_id), $(checkout_admin_name)If the reservation has the checked-in / checked-out status, you can use these tags to get the name of the admin who performed the check-in / check-out action. The value will be empty if the action was performed by the customer.
$(confirmation_time), $(checkin_time), $(checkout_time), $(mark_reserved_time), $(confirmation_date), $(checkin_date), $(checkout_date), $(mark_reserved_date)Date or date and time of the confirmation, check-in, check-out or mark-as-reserved events. Empty if the event never occurred for the reservation.
$(last_product_modification_comment), $(last_product_modification_date)If additional products were modified (by an admin or customer), you can print the modification comment or date (last one in case multiple modifications were made).
$(before_after_event_sent_X), $(before_after_event_sent_date_X), $(before_after_event_sent_time_X), $(before_after_event_sent_subject_X), $(before_after_event_sent_success_X)The first of these tags returns true if the related Before or after event was sent for the reservation. If not, an empty text is returned. X is Before or after event number between 1 and 8. For example, $(before_after_event_sent_1) will return true if Before or after event #1 was already sent for the reservation. The other tag versions (date, time, subject, success) return the date, time, subject of the notification email - if it was sent; or success status (Yes if successful or empty text otherwise).

URLs for end customer

Note: see Q357 to see how Planyo chooses where these URLs will point to.

Tag nameMeaning
$(cancel_url)URL for cancelling the reservation
$(modify_url)URL for modification of the reservation (different resource / different time / reservation options)
$(modify_personal_details_url)URL for modification of the personal details of customer
$(modify_reservation_data_url), $(modify_reservation_data_no_price_update_url)URL of the page where the customer can modify the additional reservation form fields sent originally during the reservation. Personal info and arrival/departure dates cannot be changed in this page. The second version of the tag will result in the price not being recalculated. Otherwise the price gets recalculated because the new settings could affect the price.
$(details_url)URL for viewing reservation status / cancelling etc.
$(details_url_short), $(details_url_short:XXX)This tag represents a shortened, SMS-friendly version of the $(details_url) tag. The second version allows you to specify a custom suffix which can be read on the reservation details template using the tag $(ppp_action). This allows you to do things such as display custom content or event redirect to another url represented by any of the $(..._url) tags printed here.
$(mark_reserved_url)URL the customer can use to apply the 'reserved' status to their not-completed reservation or quotation
$(invoice_url)URL of the invoice (PDF file). This will not open the url in the browser but will directly download the PDF.
$(reservation_list_url)URL of the page where the customer can see all their past and future reservations, and, if you specifically allow this in your templates, will be able to modify/cancel the selected reservations.
$(additional_products_url)URL of the page where the customer can add or remove additional or recurring products after the reservation is made. It makes sense to use this tag if you have any products defined for your resources. You can read more about additional products here.
$(payment_form_url), $(payment_form_url:XXX), $(payment_form_url_with_template:XXX), $(payment_form_url_outstanding), $(payment_form_url_outstanding_with_template), $(pamynt_form_url_direct), $(payment_form_url_direct:XXX)URL of the page containing the payment button. By default the payment amount will be the same as specified in resource settings for the pre-payment. You can optionally set a different amount here, e.g. $(payment_form_url:10.50) will ask client for the payment amount of 10.50; $(payment_form_url_outstanding) will ask the client for the outstanding amount. E.g. if the total was EUR 100 and the pre-payment was EUR 20.00 then this will ask client for the remaining EUR 80.00. The _with_template version of the tag will use your payment template instead of the default one, while the _direct version of the tag will automatically redirect the customer to the payment gateway, skipping the page with the payment button.
$(checkin_url), $(self_checkout_url)URLs for the check-in and check-out button which let the customer do a self check-in or check-out
$(coupon_info_url)URL for the page where the customer can view information about the coupons they own
$(agree_url), $(agree_and_pay_url)URL of the page where the customer can agree to your conditions. This can only happen if your reservation form includes one or more items of type 'agreement'. This is useful if the reservation was entered by the administrators and you want to make sure the customer agrees to your conditions. The first version is used only when you need customer's agreement while the second version also adds an online payment step after the agreement.
$(rental_ical), $(rental_ical:N), $(rental_ical_utz), $(rental_ical_utz:N)URL to .ics (iCalendar) file containing reservation details. The second version of this tags lets you use one of the templates defined on the data export page, e.g. $(rental_ical:3) will use the template number 3. The versions of the tag including the _utz suffix print the ical event in customer's time zone (in case you're using this feature)
$(reservation_document_url:X)URL of a reservation-specific document (PDF). You can define reservation documents in Settings / Templates / Reservation Documents. These documents can be also attached to email notifications as a PDF attachment. In order to use this tag, you'll need to replace X with the reservation document ID, e.g. $(reservation_document_url:1) for the first document.
$(review_url)URL where a customer can add reservation review. See FAQ 260 for more info.
$(message_url)URL where a customer or admin can add a reservation message.
$(cancel_cart_url)URL for cancelling all reservations in the shopping cart
$(meeting_join_url)If you're using one of the online meeting extensions (Zoom, Microsoft Teams, Google Meet), this url lets the customer join the online meeting/conference/webinar

Additional products

Tag nameMeaning
$(additional_products), $(additional_products_onetime), $(additional_products_recurring), $(additional_products_custom)Products that were added to the reservation. Printed in form of a UL tag with multiple LI entries. You can choose to print only one-time products by using the tag $(additional_products_onetime), recurring products by using $(additional_products_recurring), custom products added specifically to the reservation with $(additional_products_custom) or all products with $(additional_products).
$(additional_product_count), $(get_additional_product_number:N), $(additional_product_name:x), $(additional_product_id:x), $(additional_product_description:x), $(additional_product_price:x), $(additional_product_net_price:x), $(additional_product_tax:x), $(additional_product_tax_rate:x), $(additional_product_date:x), $(additional_product_date_added:x), $(additional_product_quantity:x), $(additional_product_extra_field:x), $(additional_product_extra_field_value:x), $(additional_product_custom:x), $(additional_product_priority_group:x), $(additional_product_image_url:x), $(additional_product_is_hidden:x), $(additional_product_orig_name:x), $(additional_products_include_hidden)Tags related to specific additional products reserved. The first one returns the count of all products reserved and the other tags return the name, price, date (only if it's a recurring product) and quantity of a specific additional product. x is in range 1 to $(additional_product_count). Use the $(foreach:xxx) tag in order to iterate across all products. If you include $(additional_products_include_hidden) anywhere in the template text, all products will be returned, including the hidden ones (added by default to reservations). Otherwise only the products added specifically by the customer will be listed. The tag $(get_additional_product_number:N) can be used in order to fetch the index (x) from a product name, e.g. $(additional_product_price:$(get_additional_product_number:cleaning fee)) would give you the price of the 'cleaning fee' product
$(additional_product_sep_count), $(additional_product_sep_name:x), $(additional_product_sep_description:x), $(additional_product_sep_price:x), $(additional_product_sep_net_price:x), $(additional_product_sep_date:x)Same as the tags above (without _sep_ in the name), except that products with multiple quantities are listed multiple times.
$(additional_product_grouped_count), $(additional_product_grouped_name:x), $(additional_product_grouped_description:x), $(additional_product_grouped_price:x), $(additional_product_grouped_net_price:x), $(additional_product_grouped_quantity:x), $(additional_product_grouped_tax:x), $(additional_product_grouped_tax_rate:x)Same as the tags above (without _grouped_ in the name), except that recurring products are only listed once.
$(prod_qty_xxx), $(prod_total_xxx)Quantity of specified additional product chosen by customer for given reservation. When product was not at all chosen, 0 will be returned. xxx is the product name with spaces replaced by the underscore character OR it can be also product's ID.
$(custom_product_price)Total price of all the custom products
$(custom_product_count), $(custom_product_price:x), $(custom_product_name:x), $(custom_product_tax_rate:x), $(custom_product_date_added:x)These tags let you iterate through all the custom reservation products. The first tag returns the total count and the other tags give you values for a specific product (numbered 1, 2, ..)

Shopping cart

Tag nameMeaning
$(cart_details)Similar to the $(reservation_details) tag above but displays the details of each item in the shopping cart.
$(is_first_shopping_cart_item), $(is_last_shopping_cart_item), $(is_first_active_cart_item), $(is_last_active_cart_item), $(shopping_cart_item_index)If you're using the shopping cart feature, this will have the value of true in case it's the first (or last) shopping cart item (sorted by rental start time) and will be empty for all other items. You can use this tag in conditional statements, for example to make sure only a single email will be sent for all items in a shopping cart. In such case you may want to use the active version: $(is_first_active_cart_item) which returns true for the first cart item which is active (not cancelled and having the reserved status). The tag $(shopping_cart_item_index) gives the 1-based index of the reservation in the shopping cart (note: this index is sorted by reservation id rather than start time so it will be 1 for the lowest id, 2 for the following etc. regardless of the time when the reservations start).
$(cart_items), $(cart_item_resource:N), $(cart_item_resource_id:N), $(cart_item_reservation_id:N), $(cart_item_start_date:N), $(cart_item_end_date:N), $(cart_item_start_time:N), $(cart_item_end_time:N), $(cart_item_prop_xxx:N), $(cart_item_prop_res_xxx:N), $(cart_item_prop_cal_xxx:N), $(cart_item_price:N), $(cart_item_quantity:N), $(cart_item_site:N), $(cart_item_site_id:N), $(cart_item_status:N), $(cart_item_company_address:N), $(cart_item_notes:N), $(cart_item_unit_name:N), $(cart_item_rental_duration:N), $(cart_item_rental_time:N), $(cart_item_rental_days:N), $(cart_item_rental_hours:N), $(cart_item_rental_minutes:N), $(cart_item_number_of_persons:N), $(cart_item_start_timestamp:N), $(cart_item_end_timestamp:N), $(cart_item_creation_timestamp:N), $(cart_item_image_url:N), $(cart_item_square_image_url:N), $(cart_items_total), $(cart_items_total_net), $(cart_items_total_tax), $(cart_items_paid), $(cart_items_outstanding), $(cart_id)If you're using the shopping cart feature, you can use these tags to extract information about all cart items. $(cart_items) will give you the number of items in the shopping cart. The other tags can be used to extract information about each reservation in the shopping cart. N is the item number, e.g. $(cart_item_reservation_id:2) will return the ID of the 2nd reservation in the shopping cart. You can use the $(foreach:xxx) tag described below to iterate through all shopping cart items. $(cart_items_total) will give you the total price of all shopping cart reservations, $(cart_items_total_net) the total price without tax, $(cart_items_total_tax) the tax for the shopping cart, $(cart_items_paid) the total amount paid for the shopping cart, and $(cart_items_outstanding) - the outstanding amount. $(cart_id) will be replaced with the shopping cart ID.
$(foreachres) ...code... $(endforres)Use this iterator tag only with the shopping cart feature. It will iterate over all reservations in the cart. In between the $(foreachres) and $(endforres) tags all reservation-specific tags from this FAQ question will represent the values for given reservation. Use $(resit) to fetch the index of the current reservation in the iteration (1, 2, ..). Note that you can use the $(foreach:xxx) iterator inside the $(foreachres) iterator.
Here's an example:
$(foreachres) Products for R$(reservation_id) : $(foreach:$(additional_product_count)) $(additional_product_name:$(it)) $(endfor) $(endforres) prints names of all additional products included in all reservations in the shopping cart.
$(cart_payment_count), $(cart_payment_date:N), $(cart_payment_time:N), $(cart_payment_amount:N), $(cart_payment_comment:N), $(cart_payment_mode:N), $(cart_payment_status:N), $(cart_payment_id:N)These tags give you detailed information about payments made for given shopping cart. See the $(reservation_payment_xxxx) tags above for a detailed description
$(cart_item_cancel_url:N), $(cart_item_modify_url:N), $(cart_item_details_url:N), $(cart_item_checkin_url:N), $(cart_item_review_url:N), $(cart_item_additional_products_url:N), $(cart_item_message_url:N), $(cart_item_modify_reservation_data_url:N), $(cart_item_modify_reservation_data_no_price_update_url:N)These tags represent URLs for given shopping cart reservations and are meant to be used inside the $(foreach:$(cart_items)) .. $(endfor) iterator. See the tag versions without the cart_item_ prefix for detailed description of each tag.
$(repeated_reservation), $(reservation_index), $(original_reservation)These tags can be used with the return trip or recurring reservation features. $(repeated_reservation) will be empty in case of the first (original) reservation; otherwise it will be the subsequent reservation number (e.g. 2 for the return trip). $(reservation_index) is similar but for the original reservation it's value is 1. $(original_reservation) will always return ID of the original reservation.

Bundle

Tag nameMeaning
$(is_bundle), $(is_bundle_item)If a bundle was reserved, $(is_bundle) will be replaced by true for the bundle reservation. For the reservations of all the resources included in the bundle, the tag $(is_bundle_item) will return true, so you can use this tag to check if a reservation is a part of a bundle or not. Both these tags return empty text if the condition is not met.
$(bundle_item_count), $(bundle_item_name:N), $(bundle_item_id:N), $(bundle_item_price:N), $(bundle_item_rental_duration:N), $(bundle_item_start_date:N), $(bundle_item_end_date:N), $(bundle_item_start_time:N), $(bundle_item_end_time:N), $(bundle_item_start_timestamp:N), $(bundle_item_end_timestamp:N), $(bundle_item_quantity:N), $(bundle_coupon_count), $(bundle_coupon_name:N), $(bundle_coupon_id:N), $(bundle_coupon_type:N), $(bundle_coupon_type_number:N), $(bundle_coupon_amount:N) If the resource reserved is a bundle, these tags will allow getting detailed information about the resources and coupons included in the bundle.

QR codes for the backend mobile app and the Planyo backend

These tags will generate a QR image which can be scanned using the Planyo backend apps for Android or iOS by an administrator.
Tag nameMeaning
$(app_qrcode:reservation)QR-encoded URL the admins can scan using the planyo mobile app to go directly to the reservation details page
$(app_qrcode:user)QR-encoded URL of the user details page
$(app_qrcode:checkin)QR-encoded URL which will check the customer in when scanned
$(app_qrcode:checkout)QR-encoded URL which will check the customer out when scanned

Iterating over collections using $(foreach)

Tag nameMeaning
$(foreach:xxx) ...code... $(endfor)Performs xxx iterations, that is, repeats the code between the $(foreach:xxx) and $(endfor) tags xxx times. In between these tags you can use the tag $(it) which prints the current iteration. Please note that you can use any other rental tag from this FAQ question to calculate the value of xxx.
Here's a simple example: $(foreach:5) #$(it) $(endfor) prints #1 #2 #3 #4 #5.
Another example: $(foreach:$(additional_product_count)) $(additional_product_name:$(it)) $(endfor) prints names of all additional products included in the reservation.


In all templates in planyo you can use the tag $(S_XXX) which represents any text visible to your clients. It makes sense to use such tags, e.g. $(S_RESRES) which will output "Make reservation" instead of the plain text version because the text will be translated automatically to client's language. to find out the IDs of given text, you can go to Site Settings / Customized translation and when you search for texts containing given keyword, you'll see the keyword ID in the left column.

Another very useful feature you can use in your templates are conditional statements: $(if) ... $(then) ... $(else) ... $(endif). They allow you to output different code based on a value of any tag. You'll find the details in Q207

See also other related FAQ questions:
Resource tags
Planyo site tags
Universal tags
Questions Fréquemment Posées (FAQ)