Go to content

Add resource details to a product message (embedded message)

In Johku, resource details such as a smart lock PIN code or a room name can't be fetched with tags directly into a product message. If you want the customer to get one message that has the details of both the product and the reserved resource, you create a resource message of the embedded type and connect it with a tag as part of the product message. This guide takes you through it in two stages.

The example is a small hotel whose room product has a resource pool and whose customer is sent, in the product message, arrival instructions and the PIN code of the reserved room.

1. Create an embedded message for the resource

  1. Open the resource and go to the Messages tab.
  2. Click Add message.
  3. Give the message a name. The name of an embedded message is not shown to the customer.
  4. Select embedded as the type.
  5. Enter a tag for the message in lowercase letters, as one word, for example pikkuhotellipin. The tag is not shown to the customer; you use it to embed the resource's message content in the product message.
  6. Write in the Message section the texts and resource tags that you want in the product message, for example the room name {resourcename} and the PIN code {pin-N}.
  7. Click Ok and save the resource.

If the product has a resource pool, that is, several similar resources, add the same embedded message to every resource in the pool and use the same tag in all of them. The content of the message is still resource-specific, for example each room's own PIN code.

2. Add the embedded message to the product message

  1. Open the product whose message you want the resource details in.
  2. On the product's Messages tab, click the message to open it, or create a new message: Create a scheduled message for a product.
  3. Write the tag of the embedded message in curly braces at the point of the message where you want the resource details, for example {pikkuhotellipin}.
  4. Click Ok and save the product.

The product message now gets the content of the reserved resource's embedded message in place of the tag. If several resources are reserved for the customer, Johku lays out the details of all the reserved resources in the message one below the other through the same tag.

Check that it works with a test order: create a manual order for the product and check that the message content is formed correctly.

If something goes wrong

The message has the details of only one resource, although the customer reserved several. Every resource in the pool must have its own embedded message, and all of them must have exactly the same tag in lowercase letters. Open the pool's resources one at a time and check their Messages tabs.