Skip to main content
All CollectionsPhysical Gifting, Fulfilment & PostagePhysical gift cards
Gift Card Codes: Formatting, Truncating, & Fixing
Gift Card Codes: Formatting, Truncating, & Fixing

Ensure gift card codes are accurately formatted, and learn how to resolve issues around gift cards that truncated.

Jake Miller avatar
Written by Jake Miller
Updated over a week ago

Introduction

Ensuring that gift card codes are accurately formatted is essential for providing a seamless experience.

In this article, we'll outline the specific formatting requirements for gift card codes, addressing common issues.

By following these guidelines, you can minimise print errors and enhance operational efficiency.

What is the purpose of gift card codes?

Gift card codes are used to redeem a gift card, sell a gift card, and / or register a gift card.

All codes are 19 digits long, and all of Toggles’ codes start with a prefix number of 63011900, followed by a further 11 digits.

This prefix number is an Issuer Identification Number (IIN) that is unique to our Toggle platform, and this number ensures we don't clash with any other gift card platform.

Toggle generates your gift card codes to ensure that:

  1. The codes are truly unique and there are no duplicates

  2. The codes work with any integrations on your account

  3. The codes can be registered by guests using the PIN provided

So what are the common problems with codes?

This is very important

We recommend you let your printer and team know that gift card codes are prone to truncating (explained more further down) so that they can check for this on the data files shared, and on print proofs.

The picture further below gives a visual representation of how the data should look on the files shared, as well where the data should go on your gift card.

By sharing this information with your full team, you can limit print issues as everyone is aware of how the Toggle gift card codes look - and if something looks odd on the data file or print proof, it can be pulled up and double checked before going any further.

Toggle codes & patterns

The codes from Toggle will always be 19 digits long.

  • They start with our 8 digit prefix number of 63011900

  • Followed by a further 11 digits - which are numbers ONLY!

The data file

Here’s an example picture of how the data file should look to you when it arrives.

The gift card picture won’t be in this file, this is to show where the data gets printed or encoded (magstripe and QR Codes get encoded by the printer).

So what is truncating?

Truncating refers to the unintentional cutting off or shortening of data, often leading to incomplete or inaccurate information.

How Do I Spot Code Truncating?

Code truncation occurs when a portion of code is cut off or incomplete due to limitations in the space available for displaying or storing it.

It could look like the picture below; the data will look wrong and won’t be in Toggles card code pattern.

Remember, codes from Toggle will always be 19 digits long.

  • Starting with Toggles 8 digit prefix number of 63011900

  • Followed by a further 11 digits - which are numbers ONLY!

If you notice any abrupt endings, or random characters that don’t follow Toggles card code patterns then truncation has probably happened. The data will then need to be fixed before anything else happens.

How do I stop this data truncating?

When it comes to avoiding data truncation, the best course of action is often prevention.

One common culprit behind data truncation is the unintentional alteration of file formats.

We strongly advise against directly opening the CSV files we send, as this action is likely to result in data truncation.

  1. Avoid Directly Opening CSV Files

    1. Do not open the CSV files directly on your computer, as this action may lead to data truncation due to compatibility issues with certain software.

  2. Use Google Sheets for CSV Files

    1. Instead, open the CSV files using Google Sheets.

    2. Google Sheets tends to handle CSV files more reliably, minimising the risk of data truncation.

    3. Simply upload the CSV file to Google Sheets to view and work with the data.

  3. Utilise the PDF as the Source of Truth:

    1. We provide PDF files, these can act as the source of truth.

    2. These PDF files are resistant to data truncation and provide a reliable representation of the information.

  4. Converting CSV to XLSX if Necessary:

    1. In cases where an XLSX format is required, it's recommended to first open the CSV file in Google Sheets and then download it as an XLSX file.

    2. This process helps maintain the integrity of the data without risking truncation.

Dealing with Truncated Data

  • Forwarded the data with this article:

    • Forward your unopened data files to your printer and team, with this guide to highlight the risk of data truncation.

  • Preferential Use of Google Sheets:

    • To avoid the risk of data truncation, it's preferable to open the data in Google Sheets. However, even when using Google Sheets, a quick check for any signs of truncation is recommended to ensure the data is correct.

  • Truncation Issues with Excel on Windows:

    • It's important to note that Windows-based Excel formats may exhibit truncation issues, particularly with scientific numbers.

    • Unfortunately, Windows does not allow the disabling of truncation within its Excel format as far as we can tell.

  • Solution for Mac Users:

    • On the other hand, Macs do allow users to disable truncation within Excel.

    • Below, we'll explain how to do this for Mac users, providing a workaround to prevent truncation issues.

  • Using the CONCATENATE Formula:

    • Alternatively, you can use the CONCATENATE formula to manually prevent truncation.

    • This formula works on both Mac and PC

    • This might be particular helpful for PC users who need to open the data and fix truncation without access to Google Sheets.

Disabling Truncation in Excel on Mac

To disable truncation in Excel on a Mac;

  1. Open Excel and go to "Excel" in the top menu bar

  2. Select "Preferences" from the dropdown menu

  3. In the Preferences window, navigate to the "Edit" tab

  4. Uncheck the boxes:

    1. Removing leading zeros

    2. Untick both Scientific Notation boxes

  5. Save the changes.

Keep in mind that Apple adds an apostrophe to the start of data to stop truncation happening sometimes - don’t print the apostrophe symbol, IT IS NOT part of the code!

Apostrophe symbol example:

Scientific conversion example:

Using CONCATENATE Formula

Unfortunately, Windows-based Excel formats are unable to disable truncation (to our knowledge), making PCs more susceptible to truncation issues.

Whilst the CONCATENATE formula provides a temporary workaround, it's important to note that it doesn't permanently fix the truncation issue as this formula, and the formula will revert back on the CSV files.

You will need to add this formula each time you open the data file (in CSV format) to stop the truncation.

We therefore recommend adding your formula to fix the issue, and then to download the data / convert the file to XLSX format. This is crucial to avoid losing data due to truncation upon reopening.

The formula required is:

=CONCATENATE

  • Delete old and wrong data:

    • Before adding the CONCATENATE formula, ensure that any old or incorrect data is deleted from the designated cells.

  • Add the formula:

    • In the cell where you want the concatenated data to appear, enter the CONCATENATE formula.

    • Example: =CONCATENATE(A1, " ' ", B1)

  • Drop and drag down on the whole range of data:

    • Once you've added the CONCATENATE formula to the first cell, you can simply drag the fill handle (the small square at the bottom right corner of the cell) down to apply the formula to the entire range of data.

    • This will automatically concatenate the corresponding data in each row.

The character between the speech marks is an apostrophe

To ensure there are no errors or truncation in the future, it's recommended to save the file as an XLSX format. This format is less prone to truncation issues compared to CSV files.

We also highly recommend, you use the "Copy" and "Paste Special" functions to avoid any risk of the formula reverting or changing in the future.

  1. Select the cells containing the CONCATENATE formula

  2. Copy it, and then "Paste Special" as a “value

    1. This will paste the values generated by the CONCATENATE formula as static text, eliminating any risk of the formula reverting or changing

Keep in mind that your data is likely to show an apostrophe at the start of data - don’t print the apostrophe symbol, IT IS NOT part of the code!

You can always use tools such as “Find and Replace” to tidy up anything like this at the very end.

The card numbers for magstripes and QR codes for encoding should be one long number with no spaces. If the magstripe or QR Code is encoded with spaces they won't work.

To quickly remove spaces from card numbers in your document, follow these simple steps (this will also work for removing apostrophes):

  1. Highlight the Card Numbers: Click and drag your mouse to highlight the column containing the card numbers. Make sure to include only the numbers themselves, not the column titles or any other text.

  2. Use Find and Replace: open the Find and Replace dialog box.

  3. Replace Spaces with Nothing: In the "Find what" field, type a single space. Leave the "Replace with" field empty.

  4. Replace All: Click on the "Replace All" button to remove all spaces from the highlighted card numbers.

By following these steps, you can ensure that only the spaces within the card numbers are removed, leaving the rest of your document intact.


Did this answer your question?