Placeholders in coreFORCE

Created by Ezra Weinstein, Modified on Tue, 23 Aug 2022 at 02:20 PM by Ethan Harris

You can use the following placeholders in any coreFORCE page, template, or email (including the javascript code, CSS code or Analytics code):

 

Placeholders:

user.address_1

user.address_2

user.city

user.state

user.city_state

user.postal_code

user.country_name

user.email_address

user.user_id

user.contact_id

user.user_group_codes

user.user_groups

user.category_codes

user.categories

user.categories_json

user.business_name

client.last_name

client.display_name

client.address_1

client.address_2

client.city

client.state

client.city_state

client.postal_code

client.country_name

client.email_address

client.contact_id

client.business_name

pageDescription

pageTitle

currentYear

currentDate

userDisplayName

pageLinkUrl

userImageFilename

 

You can also select specific rows of data to be used as placeholders. Currently (and we might add more later), you can do products, locations, designations, product_manufacturers, and FFL. You specify the record by doing one of these in any place that you can use placeholders:

 

For products:

%key_value:product_id:29483%

%key_value:product_code:FJWOIEF%

%key_value:upc_code:234919384923%

You can then use any field in products as a placeholder, including sale_price and inventory_quantity, such as %product.description% or %product.sale_price%

%key_value:location_id:29483%

%key_value:location_code:FJWOIEF%

You can then use any field in locations, such as %location.business_name% or %location.metro_area% or %location.description%

%key_value:designation_id:29483%

%key_value:designation_code:FJWOIEF%

Any field in designations.

%key_value:product_manufacturer_id:29483%

%key_value:product_manufacturer_code:FJWOIEF%

Any field in product_manufacturers.

%key_value:license_number:1-48-003-01-4F-49248%

%key_value:license_lookup:1-48-49248%

Any field in the FFL table.

 

Event Emails:

 

In addition to the standard placeholders that can be used anywhere, the substitutions for those emails will be:


- Anything in the contact row (full list below)
- anything in the event row (full list below)
- event_type
- location
- start_date
- end_date
- start_time
- end_time
- facility

Reminder that all of the following can be surrounded with "%" in order to be used.

 

For example, "%responsible_user_id%. 

 

Due to standardization of placeholders, not all of these placeholders will necessarily return relevant or useful information to a customer. Some of these could be used for internal communication or some of them may just not be applicable in general. 

 

Example data returns are given where applicable. 

 

Full List with Example Data Return:

contact_id: null,

client_id: 1,

responsible_user_id: null,

private_access: 0,

title: null,

first_name: "Test",

middle_name: "A",

last_name: "Person",

suffix: null,

preferred_first_name: null, "alternate_name": null,

business_name: null,

company_id: null,

job_title: null,

salutation: null,

address_1: "4 Joseph's Road POBox# 525",

address_2: null,

city: "Kansas City",

state: "MO",

postal_code: "64111",

country_id: 1000,

latitude: null,

longitude: null,

validation_status: 0,

attention_line: null,

timezone_id: null,

email_address: "test.person@test.example",

web_page: null,

date_created: "2021-02-23",

contact_type_id: null,

source_id: null,

birthdate: null,

image_id: null,

deleted: 0,

hash_code: "4c31a43213616cf804bbedf3c5599cde",

mailchimp_identifier: "f63aa5ef3658adf9d5be1fa3aa73bdc2",

notes: null,

version: 3,

event_id: 1,

description: "Handgun 101 - store",

detailed_description: "<p>Test class<\/p>",

event_type_id: 3,

location_id: 1,

start_date: 04/01/2021,

end_date: "",

cost: "0.00",

payment_date: null,

class_instructor_id: null,

attendees: 10,

user_id: null,

mailing_list_id: null,

category_id: null,

email_id: null,

product_id: 1,

order_id: null,

response_content: null,

link_name: "class-1-store-04012021-0900",

cancellation_date: null,

cancellation_fee: "0.00",

tentative: 0,

no_statistics: 0,

internal_use_only: 0,

inactive: 0,

event_type: "Handgun 101",

location: "Store",

location_address_block: "4321 Main St [(line break)] Colorado Springs, CO 80903",

start_time: "9:00 am",

facility: "Classroom 1",

end_time: "12:00 noon",

product_url":

 

 

Pseudo Code

You can also add pseudo code to only include content if a placeholder HAS or value or does not have a value:

 

%if_has_value:user.first_name%

                <p>Greetings %user.first_name%</p>

%endif%

%if_has_value:product.inventory_quantity%

                <p>We have this product in stock</p>

%endif%

%if_has_no_value:product.inventory_quantity%

                <p>This product is out of stock</p>

%endif%

 

Of course, you can do this multiple times. So, you could have the following in a page/template:

 

<table>

<tr>

                <th>Description</th>

                <th>UPC</th>

                <th>Sale Price</th>

</tr>

%key_value:product_code:PRODUCT_9324%

%if_has_value:product.inventory_quantity%

<tr>

                <th>%product.description%</th>

                <th>%product.upc_code%</th>

                <th>%product.sale_price%</th>

</tr>

%endif%

%key_value:product_code:PRODUCT_23984%

%if_has_value:product.inventory_quantity%

<tr>

                <th>%product.description%</th>

                <th>%product.upc_code%</th>

                <th>%product.sale_price%</th>

</tr>

%endif%

%key_value:product_code:PRODUCT_385975%

%if_has_value:product.inventory_quantity%

<tr>

                <th>%product.description%</th>

                <th>%product.upc_code%</th>

                <th>%product.sale_price%</th>

</tr>

%endif%

%key_value:product_code:PRODUCT_928324%

%if_has_value:product.inventory_quantity%

<tr>

                <th>%product.description%</th>

                <th>%product.upc_code%</th>

                <th>%product.sale_price%</th>

</tr>

%endif%

%key_value:product_code:PRODUCT_53922%

%if_has_value:product.inventory_quantity%

<tr>

                <th>%product.description%</th>

                <th>%product.upc_code%</th>

                <th>%product.sale_price%</th>

</tr>

%endif%

%key_value:product_code:PRODUCT_58392%

%if_has_value:product.inventory_quantity%

<tr>

                <th>%product.description%</th>

                <th>%product.upc_code%</th>

                <th>%product.sale_price%</th>

</tr>

%endif%

</table>


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article