List of variables available for custom functions

You can use custom functions to run designated processes during certain functions.

For example, in the function editor, select [After adding content] as the trigger and enter the target content ID in the text box to run the current function when the target content is added.

Image from Gyazo

Input refers to variables that are pre-assigned to a template, while output refers to variables that are recognized by the system as a result of processing when being assigned to a template.

The variables available differ based on the selected trigger. The following sections list the variables that correspond to the various triggers.

Content

After adding content

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After updating content

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After deleting content

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After rejecting content

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After applying content

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After accepting content

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

Before content validation

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID
$ext_noStringAdditional field number
$filenameStringFile name

Return values

Variable nameTypeDescription
$errorsObject
{Field name: Error message, ...}
Input error

After downloading content file

Can be set for each content structure ID.

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

Master

After adding master

Available variables

Variable nameTypeDescription
$csvtable_idIntMaster ID

After updating master

Available variables

Variable nameTypeDescription
$csvtable_idIntMaster ID

After deleting master

Available variables

Variable nameTypeDescription
$csvtable_idIntMaster ID

Member

Before member registration

Available variables

Variable nameTypeDescription
$rowObject
{member_id: Int, name1: String, ...}
Member information

Return values

Variable nameTypeDescription
$rowObject
{member_id: Int, name1: String, ...}
Member information

Before updating member information

Available variables

Variable nameTypeDescription
$member_idIntMember ID

After member registration

Available variables

Variable nameTypeDescription
$rowObject
{member_id: Int, name1: String, ...}
Member information

After updating member information

Available variables

Variable nameTypeDescription
$member_idIntMember ID

Before member verification

Available variables

Variable nameTypeDescription
$member_idIntMember ID
$formDataObject
{member_id: Int, name1: String, ...}
Member input information
$memberExtensionColumnsObject[]
[{
disp_name: String,
key_name:String,
type:String, ...}, ...]
Member input field

Return values

Variable nameTypeDescription
$errorsObject
{Field name: Error message, ...}
Input error

Pre-processing for row data in batch member upload

Available variables

Variable nameTypeDescription
$rowObject
{member_id: Int, name1: String, ...}
Member information

Return values

Variable nameTypeDescription
$rowObject
{member_id: Int, name1: String, ...}
Member information
$errorsString[]Error string array

After batch member upload

Available variables

Variable nameTypeDescription
$member_idsInt[]List of updated member IDs

Tag

After adding tag

Available variables

Variable nameTypeDescription
$tag_idIntTag ID
$tagDataObject
{tag_id: Int, tag_nm: String, ...}
Tag information

After updating tag

Available variables

Variable nameTypeDescription
$tag_idIntTag ID
$tagDataObject
{tag_id: Int, tag_nm: String, ...}
Tag information

Before tag validation

Available variables

Variable nameTypeDescription
$tag_idIntTag ID

Return values

Variable nameTypeDescription
$errorsObject
{Field name: Error message, ...}
Input error

-->

E-commerce

After running inventory check logic

Available variables

Variable nameTypeDescription
$cart_itemsObject
{Product ID: {
product_name: String,
topics_name:String, ...}, ...}
Items in shopping cart
$productsObject
{ topics_name:String, ...}}
Product information

Return values

Variable nameTypeDescription
$errorsObject
{Field name: Error message, ...}
Input error

Authorization

API login check

Return values

Variable nameTypeDescription
$login_emailStringE-mail address or login ID
$login_member_idIntMember ID
$login_saveBoolMaintain login status
$is_loginBoolAllow login
$custom_search_idsInt[]Permission for user logging in

After logging in

Available variables

Variable nameTypeDescription
$is_loginBoolAllow login
$auto_loginBoolSave login
$custom_search_idsInt[]Permission for user logging in
$member_idIntMember ID

Return values

Variable nameTypeDescription
$is_loginBoolAllow login
$auto_loginBoolSave login
$custom_search_idsInt[]Permission for user logging in

After changing password using reminder

Available variables

Variable nameTypeDescription
$member_idIntMember ID

Workflow

After workflow application

Can be set for each approval workflow ID.

Available variables

Variable nameTypeDescription
$module_nmStringModule name
$module_idIntModule ID

After approving workflow application

Can be set for each approval workflow ID.

Available variables

Variable nameTypeDescription
$module_nmStringModule name
$module_idIntModule ID
$approvalflow_applyObject
{approvalflow_id: Int, draft_id: Int, ...}
Application information
$nextApplyObject
{approvalflow_id: Int, approvalflow_apply_id: Int, ...}
Information on next approval application request

After rejecting workflow application

Can be set for each approval workflow ID.

Available variables

Variable nameTypeDescription
$module_nmStringModule name
$module_idIntModule ID

Notification

Upon adding notification recipient(s)

Can be set for each notification ID.

Available variables

Variable nameTypeDescription
$magazine_dataObject
{magazine_id: Int, magazine_name: String, ...}
Notification details
$destinationInt[]Member search condition ID(s) of the recipient(s)
$search_condition_listString[]Member search conditions of the recipient(s)
$preview_flgBooltrue when pre-verified on the admin panel

Return values

Variable nameTypeDescription
$additional_member_idsInt[]Member ID(s) of added recipient(s)

Before sending notification

Can be set for each notification ID.

Available variables

Variable nameTypeDescription
$mail_headerStringMessage header
$subjectStringSubject line
$bodyStringMessage body (HTML)
$body_plainStringMessage body (text)
$can_sendBoolAllow delivery
$member_idIntMember ID
$magazine_dataObject
{magazine_id: Int, magazine_name: String, ...}
Notification details

Return values

Variable nameTypeDescription
$mail_headerStringMessage header
$subjectStringSubject line
$bodyStringMessage body (HTML)
$body_plainStringMessage body (text)
$can_sendBoolAllow delivery
$memberObject
{email: String, ...}
Member information

Notification substitution

Can be set for each notification ID.

Available variables

Variable nameTypeDescription
$member_infoObject
{member_id: Int, name1: String, ...}
Recipient information
$magazine_infoObject
{magazine_id: Int, magazine_name: String, ...}
Notification details

Return values

Variable nameTypeDescription
$substitutionsObject
{String to be replaced: string to be replaced, ...}
Replaced string

If you have any other questions, please contact us or check out Our Slack Community.