What are you looking for?

    Didn't find what you were looking for?

    Extend your Search in Community

    Got any questions?

    We're always happy to help with questions you might have. Contact Us

    Didn't find what you were looking for?

    Extend your Search in Community

    Got any questions?

    We're always happy to help with questions you might have. Contact Us

Maestro Topics

Receipt Designer

   MaestroPreviously known as Transact Maestro.

In this topic, we're going to design a receipt using Maestro's Receipt Designer feature (available from v19.05). Creating a receipt in Maestro is very similar to creating a form, so only a basic understanding of form development is required.

1. Create a form

To begin, create a form with "First Name" and "Last Name" text fields.

Text Fields in Form

To make the form submittable without any further configuration, select the Maguire - Default Form template when creating the form. This isn't strictly necessary though, as we can use a Receipt Test Harness to test the receipt without navigating and submitting the form.

2. Create a receipt

In the same project as the form:

  1. Click Receipts.

    Receipts in Navigator Pane

  2. Click Create Receipt.

    Create Receipt Button

  3. Enter a name for the receipt in the Name field.

  4. From the Template dropdown, choose the Core - Empty Receipt template. This is the simplest, most barebones receipt template.

    Create Receipt Dialog

  5. Click Create.

Note

In a real-world project, we recommend creating and publishing a custom receipt template based on an existing receipt template. Functionally, receipt templates are identical to form templates, so all standard templating practices apply.

After the receipt opens in a new window, drag two text fields into the receipt.

Text Fields in Receipt

For the data from a form to appear in the receipt, the fields need to have the same XML path. To accomplish this, we suggest creating a domain model and sharing it between the receipt and form. In this topic though, we'll just manually ensure the component IDs are the same.

Change the ID of the first text field to "firstName" and the ID of the second text field to "lastName". Their labels should automatically regenerate.

Text Field IDs

Note

By default, XML names are auto-generated based on component IDs. If this option is disabled via the Integration properties, you'll need to manually set the XML names rather than the component IDs.

Auto-Generate XML Name

So far we've recreated the form in the receipt, but typically, receipts will look different from their forms.

For one example of how to approach this:

  1. Drag a Text Field component into the receipt.
  2. Change the ID of the component to "fullName".
  3. Click Create Rule.
  4. Under the Calculation heading, click Script.
  5. Copy and paste the following code into the code editor:

    return data.firstName + " " + data.lastName;

  6. Click Save.

This code concatenates the first name and last name into a single line of text.

To see this, switch to the Preview tab and fill out the First Name and Last Name fields. The Name field will update with the combined result of these values.

Cocatenate Text Fields

Finally, click Build to make the receipt available to the form.

Build Receipt

3. Download the Form Version Archive file

  1. Return to the form and refresh the interface.
  2. Click Build > Build and Download TM Form Version.
  3. Enable Use Separate Receipt Design.

    Use Separate Receipt Design

  4. Select a receipt from the Receipt Version dropdown. (If the receipt isn't available, verify that you clicked the Build button in the previous step.)

    Receipt Dropdown

  5. Select a version number from the Receipt Verion dropdown.

  6. Click Build.

  7. Click Download TM Form Version to download the Form Version Archive file.

Note

Multiple forms can use the same receipt.

4. Deploy the form to Journey Manager

Note

Whether or not a custom receipt has been designed in Maestro, the process of deploying a form to Journey Manager is the same.

  1. Login to Journey Manager.
  2. Navigate to Forms > Forms.
  3. Click Import Form.
  4. Click Browse.
  5. Select the Form Version Archive file downloaded in the previous step.
  6. Click Upload.
  7. Select Create a Form.
  8. Click Proceed to Import.
  9. Click Import.

5. Test the receipt

Rather than testing the receipt by repeatedly submitting the form, use Manager's Receipt Test Harness feature:

  1. Navigate to the Form Dashboard for the imported form.
  2. Click Receipt Test Harness.

    Receipt Test Harness

  3. Inside the XML Receipt Data field, change the values of the "FirstName" and "LastName" fields.

    Receipt Test Harness Fields

  4. Click Test PDF Receipt or Test HTML Receipt.

    Receipt Test Harness Buttons

The receipt, as we'll see, contains the data from the form:

Receipt PDF Preview

This is a simple receipt, but it does demonstrate:

  • How a receipt can be designed in Maestro.
  • How data flows from a form and into a receipt.
  • How form rules can affect the display of data.

With these fundamentals, it's possible to create more complex receipts.

Feedback

Did this topic provide the information you need or leave you wanting to know more? Is there some way we can make this topic better? Let us know how we can improve this documentation.

Contact Us

Community

Our Community is a dynamic, user-driven source of information that provides a home for sharing Journey platform knowledge where you can ask questions and get answers quickly.

Explore Community

Support

Temenos is committed to supporting our customers with Journey platform solutions installed in the cloud or on premise. Learn more about our Customer Care Team, and its policies, procedures, and processes.

Learn More