About #AHP# code snippets for Stargate

Learn about Stargate's code snippets—what they are, what they do and why they're important:

About the Stargate #AHP# code snippet

Each automated message sent through Stargate will need to include a unique #AHP# code snippet at the bottom of it. The code snippet tells to our system what to do with the message—what conditions should be met before it's released, which reservation it belongs to, etc.

Understanding its elements

#AHP#<pms>:<medium>:<reservation_id>:<tag>:<user_id>#AHP#

 

#AHP#: AHP stands for AutoHost Protect; the Stargate system looks for this piece of code to determine how to handle the message

<pms>: Which PMS/integration you are using. Possible values:
  • guesty
  • myvr
  • beds24
  • bookingcom
  • other
<medium>: Which channel of communication the message should be sent through. Possible values:
  • Email
  • Platform
  • SMS
    *** Note: If your PMS does not support a given medium, Stargate will default to use ‘email'
    *** ‘Platform' is normally only used for Airbnb. All other booking sources will default to the email that the reservation has recorded for that guest.
<reservation_id>: This is the variable that is used by your PMS to identify the reservation.
IMPORTANT: Make sure to use the variable name and formatting as used by your PMS to ensure it will properly resolve to the confirmation code / reservation ID that will be used to identify the correct booking. Possible values:
  • For Guesty, use this variable: confirmation_code
  • For MyVR, use this variable: reservation_id
  • For Beds24 / Booking.com / other options, your integration might use ID / reservation_id / reservation_code / booking_id / etc. (make sure to check your PMS for the correct variable)
<tag>:  The tag is a very important part of the code snippet as it indicates to Stargate what type of message it is and, therefore, how it should be handled and which conditions Stargate should apply to process it. Possible values:
  • confirmation
    This is sent upon booking confirmation. The message will be released to the guest as long as the reservation is confirmed (hasn’t been cancelled.)
  • reminder
    These messages are sent to the guest to remind them to complete the Guest Portal. These are sent as long as the Guest Portal has not been completed and no manual override was selected (Approve/Decline).

    Note: Since no duplicate snippets are allowed for different messages, to create multiple reminders, use the tags: reminder1, reminder2, reminder3, reminder4, etc.
  • reminderurgent
    These messages are also sent to the guest to remind them to complete the Guest Portal. The urgent reminders, however, are meant to include more assertive language as the date of check-in approaches. These are sent as long as the Guest Portal has not been completed and no manual override was selected (Approve/Decline).

    Note: Since no duplicate snippets are allowed for different messages, to create multiple urgent reminders, use the tags: reminderurgent1, reminderurgent2, reminderurgent3, etc.
  • gpcomplete
    This message can be sent to the guest as soon as they complete the Guest Portal, regardless of their verification status. You could use it to thank the guest for filling out the Guest Portal or let them know when to expect the check-in instructions. 
  • ci
    This message includes the check-in instructions and is only released if the guest has either been Verified through the guest portal or manually Approved.
  • verified  
    Any other secure/confidential message to be released only once the guest has either been Verified through the Guest Portal or manually Approved.
 
Example of how you might type the snippet in your message templates on your PMS:
 #AHP#guesty:platform:{{confirmation_code}}:ci#AHP#

 


NOTES:
  • Every message sent through Stargate must have an #AHP# code snippet, otherwise, it will be ignored by the system.
  • Each message can only have one #AHP# code snippet. If you need to send multiple messages, they need to be set up separately.
  • The #AHP#……..#AHP# snippet must be at the very bottom of the message, so make sure it is the last line of text.
  • Every code snippet must be unique. If two messages have the exact same code snippet, Stargate will be forced to ignore one of them.
  • The same tag can be repeated for multiple mediums. (i.e. reminder1 can be set to be sent as both an email and an SMS) but they must be set as two separate messages.