Trying to understand Ticket Templates

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

-- General layout
<T>The Best Restaurant

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               
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.

We are trying to avoid changing the tutorial and simply just giving a small solution. But if you want to offer him an alternative then you should explain your entire setup flow because He is referring to the tutorial Q wrote.

Is all im doing ;-), nothing major… extra entity field and action to update :smile:
Either solution works, as always many ways to do something.

Although your solution would mean to create a voucher you would need to create customer entity first :stuck_out_tongue: depends on if his voucher customers need a customer entity every time which they would with that, if not simpler solution on your method would be a [?Customer Name] prompt for the program setting…
If he just wants the name on the transaction document then yours is simpler :+1: (with the [?prompt] is doesnt want/need to setup customer entity every time first)
If he would like to have on the account post receipts when voucher is used my option would be needed.

@marios if you would like more info on my alternative shout and will sort some more info/instructions, if not no worries :smile:

Next your going to suggest what color it should be lol. I think your over analyzing it. He simply asked for a way to show the Customers Name that purchased it. So this is assuming he assigned a customer to the ticket and his description supports that.

Either way @marios I showed you a simple method if you want to explore others then JTR is more than willing to share with you an alternative as well.

1 Like

Your solution used {ENTITY NAME:Customer} so also presumed hes assigning customer to the ticket :stuck_out_tongue_winking_eye:
Ok misread that but either way the option is there :smile:

Quite possibly LOL

No, colour is his choice LOL

I thought thats what I just said in the quote you just quoted lol. My brain is hurting now I think I may take a break like Q


You did, I misread it :smile: am only playing with you, not arguing…
Was just saying that if he was only setting up customer entity with the aim of putting the name on the voucher receipt it wasnt needed if it was only a reference for the voucher.

Sorry, am just a bit hyper from a good productive day at the day/morning job :smile:

Great solution guys works like charm …
I will try to do the same for the Gift Certificate Names … :smile:

Thank you very much for your help and for the informations that you provide me …

1 Like