/
Ongage System Fields and Functions

Ongage System Fields and Functions

Table of Contents:

 

General System Fields

Intro

A full list of all available System Fields can be found when clicking on the 'System Fields' button in the message editor.

image-20250124-092505.png
image-20250124-092633.png

List of Ongage System Fields

Following is a list of Ongage System Fields which can be used as Dynamic Fields aka Merge Tags anywhere in Ongage. For more details about using Dynamic fields please refer the documentation here.

NAME

TITLE

NOTES

ocx_contact_id

Contact ID

Universally unique Ongage Contact ID

ocx_created_date

Created Date

Date when contact was first added to list

ocx_list_id

List ID

Unique number ID of Ongage list

ocx_campaign_name

Campaign Name

The Campaign Name you entered on the Campaign Configuration Page

ocx_subject

Message Subject

The Subject Text E.g., Spring Sale or Holiday Special, etc.

ocx_mailing_id

Campaign ID

Unique numeric ID of Ongage Campaign ID aka CID

ocx_message_id

Message ID

Unique numeric ID of Ongage message (email / sms message) as it appears in ID column under Content > Email/SMS Messages

ocx_segment_id

Associated Segment ID

First Segment ID that contact is associated with in this campaign

ocx_all_segments

Associated Segments

All the segment IDs associated with the contact for this campaign

ocx_child_id

Chunk ID

Sub-campaign (Ongage break each campaigns in smaller parts before sending that are called Sub-campaigns)

ocx_connection_id

ESP Connection ID

Vendor connection ID as can viewed from the "My Connections page"

ocx_esp_id

ESP ID

Unique Ongage ID that identifies the vendor in the Ongage network

ocx_from_address

From Email Address

The email address used as From Address in ESP/Email Settings screen

ocx_from_address_domain

From Email Domain

The domain of the from email address

ocx_from_name

From Name

The From Name used in ESP/Email Settings screen

ocx_reply_address

Reply to Email

The email address used as From Address in ESP/Email Settings screen

ocx_import_id

Last Import ID

Latest Import ID associated with the contact in this list. Unique ID associated with each Import can be found under List > Import.

System Date Fields

Following is a list of Ongage System Date Fields which can be used as Dynamic Fields aka Merge Tags anywhere in Ongage.

General Functions 

Intro 

  1. The following functions can be used in the body of a message (email and/or SMS)

  2. A full list of all available functions can be found when clicking on the 'System Fields' button in the message editor.

 

URL Encoding Function

{{ocx_url_encode{http://www.somedomain.com/add}}} Can be used in the following manner, let's say you have a parameter, that is a link, or simply a literal string of characters that has spaces and/or other characters that requires URL encoding: <a href="http://www.somedomain.com/click?redir={{ocx_url_encode{http://www.somedomain.com/options}}}">Click here for more info</a> Note: the content of Ongage dynamic values are URL encoded so in the following case there is no need to use this function: <a href="http://www.domain.com/?car={{model}}&year={{model_year}}">Click here for your car deals</a>

Unsubscribe Link Encoding Function

For Marketers who don't want Ongage to use default Unsubscribe tracking but want to use Encoded unsubscribe link as an URL Parameter, they can use this function. This function can be used in the following manner. 

Example Link: <p><a href="https://www.somedomain.com?ongage_unsubscribe_link={{ocx_unsubscribe_link_encoded}}" link="">unsubscribe</a></p>

Before you use this function, it is recommended to disable default unsubscribe link enforcement from your account. You can contact Ongage Support to help you with needful setup.

Date Format Function

Enables the formatting of system date fields and list date fields within the body of the message {{list_field_name[format=d/m/Y]}} or {{system_field_name[format=M/d/y]}}

{{ocx_created_date[format=d/m/Y]}} {{ocx_created_date[format=Y/m/d]}} d - The day of the month (from 01 to 31) D - A textual representation of a day (three letters) j - The day of the month without leading zeros (1 to 31) l (lowercase 'L') - A full textual representation of a day N - The ISO-8601 numeric representation of a day (1 for Monday, 7 for Sunday) S - The English ordinal suffix for the day of the month (2 characters st, nd, rd or th. Works well with j) w - A numeric representation of the day (0 for Sunday, 6 for Saturday) z - The day of the year (from 0 through 365) W - The ISO-8601 week number of year (weeks starting on Monday) F - A full textual representation of a month (January through December) m - A numeric representation of a month (from 01 to 12) M - A short textual representation of a month (three letters) n - A numeric representation of a month, without leading zeros (1 to 12) t - The number of days in the given month o - The ISO-8601 year number Y - A four digit representation of a year y - A two digit representation of a year a - Lowercase am or pm A - Uppercase AM or PM g - 12-hour format of an hour (1 to 12) G - 24-hour format of an hour (0 to 23) h - 12-hour format of an hour (01 to 12) H - 24-hour format of an hour (00 to 23) i - Minutes with leading zeros (00 to 59) s - Seconds, with leading zeros (00 to 59) e - The timezone identifier (Examples: UTC, GMT, Atlantic/Azores) I (capital i) - Whether the date is in daylights savings time (1 if Daylight Savings Time, 0 otherwise) O - Difference to Greenwich time (GMT) in hours (Example: +0100) P - Difference to Greenwich time (GMT) in hours:minutes T - Timezone abbreviations (Examples: EST, MDT) Z - Timezone offset in seconds. The offset for timezones west of UTC is negative (-43200 to 50400) c - The ISO-8601 date (e.g. 2013-05-05T16:34:42+00:00) r - The RFC 2822 formatted date (e.g. Fri, 12 Apr 2013 12:01:05 +0200) U - The seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)

Add offset to ocx_now to support dynamic date

This feature allows marketers to add tomorrow's date in the email content. This can be used as follows:

For more information, there are more options available on how these parameters can be used. Options to use with the "offset" parameter are as follows:

  • +1 day

  • next Sunday/Monday/Tuesday etc...e.g: {{ocx_now[format=m/d/Y,offset=next tuesday]}}

  • -1 week

  • last Tuesday/Wednesday etc... e.g: {{ocx_now[format=m/d/Y,offset=last tuesday]}}

  • +1 month-3 days e.g: {{ocx_now[format=m/d/Y,offset=+1month-3days]}}

Math Calculation Function

{{ocx_math_eval}}

Email Address Hashing Functions

Introduction

  • Ongage offers an advanced hashing function that by default does a SHA-1 hash. When used with the MD5 parameter, it will perform an MD5 hash.

  • This function is for use within the body of your HTML email, enabling you hash a dynamic field, typically the email.

  • The hashed email is typically stored in a system dynamic variable called {{ocx_custom_hash}} . If you're using an SMTP connection, that variable will work as is, in the case of ESP type connections, you will typically need to ask support to map that variable for you in the outbound ESP.

SHA-1 Hash 

SHA-1 is a cryptographic hash function designed by the United States National Security Agency. Following is how you can use it Ongage:

SHA-256 Hash 

The SHA-256 is a set of cryptographic hash functions designed by the National Security Agency (NSA). SHA stands for Secure Hash Algorithm. Following is how you can use it Ongage:

MD5 Hash 

The MD5 message-digest algorithm is a widely used cryptographic hash function producing a 128-bit (16-byte) hash value, typically expressed in text format as a 32-digit hexadecimal number. MD5 is a one-way function. Following is how you can use it Ongage:

How to use all 3 hashing functions in the same email message

As of August 2016 you can now use all 3 hashing methods in the same email, here's how. We've added a new parameter to the ocx_generate_hash function called "name=" which you can indicate to store the hashed email and then use it as a dynamic variable in your email as demonstrated below:

The previous way described above this sub-section still works, so that if you don't indicate name of the variable to store the hashed email in, then the hashed value ill be stored in: {{ocx_custom_hash_email}}.

How to implement LiveRamp with SHA-1 hash

Following is example of how to implement LiveRamp in an email sent from Ongage.

 

 

Related content

Ongage Entity IDs
Ongage Entity IDs
More like this
Campaigns
Campaigns
More like this
Content
Content
More like this
Transactional Mailing API Methods
Transactional Mailing API Methods
More like this
Email Design
Email Design
Read with this
Fields Setup
Fields Setup
More like this