Trying to understand Ticket Templates

I get that, was purely saying that to me it looked like he was trying to add the customers name to the transaction receipt by doubling up the entities to use both gift voucher and customer entities as his other screenshot showing a customer name of ‘asdfgh’
And was offering a idea that if he wanted customer name (like i did in my alternative method) that would be a solution which should be useable with your GC setup.

Wow a lot of informations …
First of all Thank you for your answers …
The most of waht you suggested i have already try them …
(I always search the forum for solution and i post only if I can’t find any or if i’m desperate :grin:)
For example

  1. I want the name of the customer who bought the ticket
  2. Gift Certificate already used but nothing …

{ENTITY NAME:x} will not work on a transaction document template as its looking at accounts not entities.

Did you try what he said there?

Can you show your rule thats executing it?

yep

This is the transaction document template from QMcKays tutorial;

No mention of entity name there…

{ENTITY NAME:Gift Certificate} would give gift certificate number on the receipt when sales re charged to the account.

It can but you will need to do some additional modifications.

Can you show your rule thats firing that?

I have many Gift Certificates with many different names so i’t trying a solution not to create rules,actions and templates for each one.


Do you mean you have many gift certificate products?
QMcKays method if I remember right used products to sell and define the value of the voucher/account credit.

Even though you have different gift voucher products your gift voucher entities are still all the same gift certificate entity type and account type right?

Ok I apologize I was working with no knowledge of the Tutorial. I have the tutorial installed so let me study it then I will give you an answer.

@JTRTech in the QMcKay’s tutorial the template is this

[LAYOUT]
-- General layout
<EB>
<T>The Best Restaurant
<DB>
<J00>{DOCUMENT DATE} {DOCUMENT TIME}
<L>
<EB>
<C01>GIFT CERTIFICATE
<DB>
<L>
{TRANSACTIONS}
<C>NO CASH VALUE
<F>*
[TRANSACTIONS]
<C11>{AMOUNT}
<L>
<F>-
<EC>
-- <QR>{SOURCE ACCOUNT}
-- <BAR>{SOURCE ACCOUNT}
<EL>
<J00>{SOURCE ACCOUNT} | {AMOUNT}  

At this point GIFT CERTIFICATE what ever name your gift has it will always say GIFT CERTIFICATE

I’m trying to change the name according to the cartificate name that customer buy …

This line is fixed test, it not ment to change…
Its like a title…
I know exactly what your trying to do though :smile:

Ok on the Gift Card printout you will NOT be able to pass the customers name that purchased it. If you wish to do this then you need to store it as a program setting and then use the program setting tag in your transaction template.

The transaction template has no idea about Entity Name its simply printing a transaction.

With my voucher setup I added a custom entity field of Customer Name and used a [?Customer Name] prompt for input as part of the voucher creation rule.

In QMcKays tutorial the create flow is a little difference so cant give you a straight solution off top of my head.

Youll need to add a custom entity field of Customer Name to the Gift Voucher entity type first of all.
Then youll need an ‘Update Entity Data’ action for a start, which will be used to update this field.
If you set Entity Type to ‘Gift Cetrificate’
The part I am less confident on is calling the account/entity name in the flow you curently have.
In theory I beleive [=Data.Get(“AccountName”)] should return th account name which should also match the entity name (might need to ‘hard code’ GC in front of it but can tell that when seeing your entities and accounts names)
And for Field Name you would have ‘Customer Name’
For value you would want [:Customer Name] which then within the action you would put [?Customer Name] in this field.

This is true but on the basis that entity name is directly related to account name you can use {ACCOUNT NAME} to pull values from the entity associated with the account with something like;

Apologies I know {ACCOUNT} is wrong, it would be target acount I think

Here is the simple setup to do this.

Create an Update Program Setting Action

In your rule GC Purchased & Printed add the new action and move it to the TOP of the list of actions in the rule. Add {ENTITY NAME:Customer} for Setting Value.

Finally in your printer template add the following line where you want it.

<C00>Customer: {SETTING:Store Entity Name}

Result =

░░ T h e   B e s t   R e s t a u r a n t ░
12/21/2015 2:54 PM
        Customer: Jesse Doddson               
                                          
  GIFT CERTIFICATE   
                                          
        15.00        
                                          
------------------------------------------
GC20151221145417915                  15.00
              NO CASH VALUE               
******************************************

@Jesse I know what your saying but wouldnt it be better to log the customer name in the gift voucher entity so that it can be used on future receipts related to the voucher without having 100’s of program settings for all the gift vouchers or a value which only works on the voucher transaction document.
Like in my template;

@JTRTech his setup is not like that. If he followed the setup Q provided. The Entity name is the certificate number which is generated during the transaction. The solution I provided is quick simple 1 action addition to get desired result without having to redo anything.

So no I disagree I think what you suggest adds complication vs just using Program Setting to store the value. I mean he just needs it for the printout of the certificate. For reporting he can refer to the ticket not the Gift Certificate.

Yes, I know that…
If the Gift Certificate entity had a Customer Name field given that entity name and account name are the same we can use account name to pull the entity data field value within the account transaction document print…

Nothing needs redoing just addiding the field and ac action to set the value with a prompt.

Not saying either way is wrong just offering an alternative solution with improved functionality in that customer name would be available for a voucher sumary section on ticket template for voucher paid tickets like i did on mine.
Am not sugesting he change anything from the tutorial just add a couple of bits.