Skip to main content

List of triggers and variables available for custom functions

You can use Custom function to run designated processes during certain functions.

For example, in the Custom 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

Visibility of content in Admin panel

Note: This trigger will only be executed if logged in as a "Super User". Called when displaying the content list screen or content upload screen. Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Visibility of content in Admin panel"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available Variables

Variable NameTypeDescription
$ext_configObject (ext_config)Content extension settings

Return Values

Variable NameTypeDescriptionSample
$filtersObjectFilter conditions{"filter":"subject contain SomeText","order:"subject=ASC"}
For more information, refer to How to Use the Search Function.
$disable_columnsArrayKeys of items to be hidden["ymd", ... ]
$default_columnsArrayKey name, display name, and sorting of items to be displayed by default[{"key_name":"topics_id","disp_name":"TOPICS ID","sortable":true}, ...]
$errorsString
Array
Object
Display errors"Error message"
[ "Error message", ... ]
{ "Item Name": "Error message", ... }

Before adding content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before adding content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObjectData from the form

Return Values

Variable NameTypeDescription
$rowObjectData from the form

After adding content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After adding content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID
$ext_configObject (ext_config)Content extension settings

Before updating content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before updating content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObjectData from the form

Return Values

Variable NameTypeDescription
$rowObjectData from the form

After updating content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After updating content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

Before deleting content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before deleting content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available Variables

Variable NameTypeDescription
$rowObjectData from the form

After deleting content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After deleting content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

Before saving content as draft

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before saving content as draft"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObjectData from the form

Return Values

Variable NameTypeDescription
$rowObjectData from the form

After saving content as draft

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After saving content as draft"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$topics_idIntContent ID
$draftIdIntIn-progress data ID
$topicsDataObjectArticle data
$ext_configObject (ext_config)Content extension settings

Before deleting content saved as draft

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before deleting content saved as draft"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObject
{ topics_id:Int,
draftId:Int, ...}
Data from the form

After deleting content saved as draft

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After deleting content saved as draft"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$topics_idIntContent ID
$draftIdIntIn-progress data ID

When Copying Content

You can set it for each content structure ID.

How to Specify Components

  • Trigger: Select "When Copying Content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available Variables

Variable NameTypeDescription
$copy_topics_idIntID of the source content to be copied
$copy_topics_dataObjectData to be copied

Return Values

Variable NameTypeDescription
$dataObjectData to be copied, same format as copy_topics_data

Before rejecting Content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before rejecting Content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObjectData from the form

Return Values

Variable NameTypeDescription
$rowObjectData from the form

After rejecting content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After rejecting content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

Before applying content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before applying content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObjectData from the form

Return Values

Variable NameTypeDescription
$rowObjectData from the form

After applying content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After applying content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

Before accepting content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before accepting content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$rowObjectData from the form

Return Values

Variable NameTypeDescription
$rowObjectData from the form

After accepting content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After accepting content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After public / private batch of content

  • Trigger: Select "After public / private batch of content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available Variables

Variable NameTypeDescription
$topics_idIntContent ID
$ext_configObject (ext_config)Content extension settings
$open_flgInt1: Published, 0: Unpublished

Before content validation

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "Before content validation"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_idIntContent ID
$ext_configObject (ext_config)ontent extension settings
$uploaded_rowObjectRow data at CSV upload

Return values

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

Before upload content

You can configure for each content structure ID.

How to specify components

  • Trigger: Select "Before upload content"
  • Text Field: Enter the content structure ID targeted by the trigger.

Available variables

Variable NameTypeDescription
$update_topics_idsInt[]Array of content IDs to be updated

After Upload Content

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After Upload Content"
  • Text Field: Enter the content structure ID to be targeted by the trigger

Available Variables

Variable NameTypeDescription
$update_topics_idsInt[]Array of updated content IDs
$insert_topics_idsInt[]Array of added content IDs
$ext_configObject (ext_config)Content extension settings

After downloading content file

Can be set for each content structure ID.

How to specify components

  • Trigger: Select "After downloading content file"

Available variables

Variable nameTypeDescription
$topics_idIntContent ID

After adding content category

You can set this for each content structure ID.

How to specify components

  • Trigger: Select "After adding content category"
  • Text field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_category_idIntContent category ID
$topics_category_dataObjectInformation of the added category

After updating content category

You can set this for each content structure ID.

How to specify components

  • Trigger: Select "After updating content category"
  • Text field: Enter the content structure ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$topics_category_idIntContent category ID
$topics_category_dataObjectInformation of the updated category

Master

After adding master

How to specify components

  • Trigger: Select "After adding master"

Available variables

Variable nameTypeDescription
$csvtable_idIntMaster ID

After updating master

How to specify components

  • Trigger: Select "After updating master"

Available variables

Variable nameTypeDescription
$csvtable_idIntMaster ID

After deleting master

How to specify components

  • Trigger: Select "After deleting master"

Available variables

Variable nameTypeDescription
$csvtable_idIntMaster ID

Member

Before member registration

How to specify components

  • Trigger: Select "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

How to specify components

  • Trigger: Select "Before updating member information"

Available variables

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

After member registration

How to specify components

  • Trigger: Select "After member registration"

Available variables

Variable nameTypeDescription
$member_idIntMember ID

After updating member information

How to specify components

  • Trigger: Select "After updating member information"

Available variables

Variable nameTypeDescription
$member_idIntMember ID

Before member verification

How to specify components

  • Trigger: Select "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

How to specify components

  • Trigger: Select "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

How to specify components

  • Trigger: Select "After batch member upload"

Available variables

Variable nameTypeDescription
$member_idsInt[]List of updated member IDs

Tag

After adding tag

How to specify components

  • Trigger: Select "After adding tag"

Available variables

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

After updating tag

How to specify components

  • Trigger: Select "After updating tagr"

Available variables

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

Before tag validation

How to specify components

  • Trigger: Select "Before tag validation"

Available variables

Variable nameTypeDescription
$tag_idIntTag ID

Return values

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

Activity

Before activity validation

You can set it for each comment header ID.

Component Specification

  • Trigger: Select "Before Activity Validation"
  • Text Field: Enter the comment header ID to be targeted

Available Variables

Variable NameTypeDescription
$comment_header_idIntComment header ID

Return Value

Variable NameTypeDescription
$errorsArray
[Error messages, ...]
Input errors

After adding activity

Called when an activity (comment) is added via API.

Component Specification

  • Trigger: Select "After Activity Addition"
  • Text Field: Enter the comment header ID to be targeted

Available Variables

Variable NameTypeDescription
$comment_header_idIntComment header ID
$comment_idIntComment ID

After updating activity

Called when an activity (comment) is updated via API or from the admin panel.

Component Specification

  • Trigger: Select "After Activity Update"
  • Text Field: Enter the comment header ID to be targeted

Available Variables

Variable NameTypeDescription
$comment_header_idIntComment header ID
$comment_idIntComment ID

E-commerce

After running inventory check logic

How to specify components

  • Trigger: Select "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

After processing e-commers payment

This is called when the payment is completed.
If the purchase is made without payment (0 yen) or through credit card payment, the payment processing is performed at the time of purchase, so use this trigger instead of "After processing e-commers order".

Specifying the Component

  • Trigger: Select "After processing e-commers payment"

Available Variables

Variable NameTypeDescription
$order_idIntOrder number
$customerIdIntMember ID of the purchaser
$name1StringLast name of the purchaser
$name2StringFirst name of the purchaser
$group_listObject
{ topics_name:String, ...}
Group information of the purchaser
$member_dataObject
{ name1: String,
name2: String,
email: String, ...}
Member data of the purchaser
$order_infoObject
{ ec_order_id:Int,
payment_method:Int,
payment_total:Number,
total:Number,
subtotal:Number,
deliv_fee:Number,
trade_number:String,
approval_number:String, ...}
Order information
$payment_type_optionsObject
{payment_method_id: Payment method, ....}
List of payment methods with ID as the key
$productsObject
{ product_name:String,
product_id:Int,
topics_name:String,
topics_id:Int,
price:Number,
quantity:Int, ...}
Information of purchased products
$product_idsArrayArray of product IDs
$is_exists_download_productInt1: Downloadable product exists
0: No downloadable product

※There are other available variables, but only commonly used ones are listed.

Return Value

None.

After processing e-commers order

This is called when the order is completed.

Specifying the Component

  • Trigger: Select "After processing e-commers order"

Available Variables

Variable NameTypeDescription
$order_idIntOrder number
$customerIdIntMember ID of the purchaser
$name1StringLast name of the purchaser
$name2StringFirst name of the purchaser
$group_listObject
{ topics_name:String, ...}
Group information of the purchaser
$member_dataObject
{ name1: String,
name2: String,
email: String, ...}
Member data of the purchaser
$order_infoObject
{ ec_order_id:Int,
payment_method:Int,
payment_total:Number,
total:Number,
subtotal:Number,
deliv_fee:Number,
trade_number:String,
approval_number:String, ...}
Order information
$payment_type_optionsObject
{payment_method_id: Payment method, ....}
List of payment methods with ID as the key
$productsObject
{ product_name:String,
product_id:Int,
topics_name:String,
topics_id:Int,
price:Number,
quantity:Int, ...}
Information of purchased products
$product_idsArrayArray of product IDs
$is_exists_download_productInt1: Downloadable product exists
0: No downloadable product

※There are other available variables, but only commonly used ones are listed.

Return Values

None.

Authorization

API login check

Specifying the Component

  • Trigger: Select "Specifying the Component"

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

Befor API logging in

How to Specify Components

  • Trigger: Select "Befor API logging in"

Return Values

Variable NameTypeDescription
$errorsString[]Error messages; if set, login will fail
$is_loginBooltrue: Logged in, false: Not logged in
If false, automatic login will be performed later.

After logging in

Specifying the Component

  • Trigger: Select "After processing e-commers order"

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

Specifying the Component

  • Trigger: Select "After changing password using reminder"

Available variables

Variable nameTypeDescription
$member_idIntMember ID

Workflow

After workflow application

Can be set for each approval workflow ID.

Specifying the Component

  • Trigger: Select "After workflow application"
  • Text Field: Enter the Approval Workflow ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$module_nmStringModule name
$module_idIntModule ID

After approving workflow application

Can be set for each approval workflow ID.

Specifying the Component

  • Trigger: Select "After approving workflow application"
  • Text Field: Enter the Approval Workflow ID to be targeted by the trigger

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.

Specifying the Component

  • Trigger: Select "After rejecting workflow application"
  • Text Field: Enter the Approval Workflow ID to be targeted by the trigger

Available variables

Variable nameTypeDescription
$module_nmStringModule name
$module_idIntModule ID

Notification

Upon adding notification recipients

Can be set for each notification ID.

Specifying the Component

  • Trigger: Select "Upon adding notification recipients"
  • Text Field: Enter the Magazine ID to be targeted by the trigger

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.

Specifying the Component

  • Trigger: Select "Before sending notification"
  • Text Field: Enter the Magazine ID to be targeted by the trigger

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.

Specifying the Component

  • Trigger: Select "Notification substitution"
  • Text Field: Enter the Magazine ID to be targeted by the trigger

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

Form

Processing for row data in submissions download

You can set it for each form ID.
Trigger processing is executed for the header row and each answer data row when downloading form answer data.

How to Specify Components

  • Trigger: Select "Processing for row data in submissions download"
  • Text Field: Enter the form ID to be targeted by the trigger

Available Variables

Variable NameTypeDescription
$headerString[]Associative array of header strings.
Only specified during trigger processing for the header row.
The key is set to the same key string as each row
$rowString[]Associative array of CSV strings.
Only specified during trigger processing for each answer row.
The key is set to the same key string as the header row.

Return Values

Variable NameTypeDescription
$headerString[]Associative array of header strings.
Specify as the return value to change the header strings if needed.
$rowString[]Associative array of CSV strings.
Specify as the return value to change the CSV content if needed
$errorsString
Array
Object
Display Error
"Error message"
[ "Error message", ... ]
{ "Item name": "Error message", ... }

Message Template

Instead of the default email sending method (SendGrid)

This is called when sending mail, this function is used to replace the sending of mail with a mail delivery service other than the default (SendGrid).

How to Specify Components

  • Trigger: Select "Instead of the default email sending method (SendGrid)"

Available Variables

Variable NameTypeDescription
$payloadStringJSON string containing email content and parameters

Return Values

Variable NameTypeDescription
$is_mail_sentBooltrue: Do not perform standard email sending and confirm sending of email
false: Perform standard email sending

When sending mail using template

You can set it for each message template.

How to Specify Components

  • Trigger: Select "When sending mail using template"
  • Text Field: Enter the ID of the target message template for the trigger

Available Variables

Variable NameTypeDescription
$bodyStringEmail body content

Return Values

Variable NameTypeDescription
$bodyStringEmail body content
$avoid_sendingBooltrue: Do not perform standard email sending
false: Perform standard email sending

When sending mail with inquiry thanks mail

You can set it for each form ID.

How to Specify Components

  • Trigger: Select "When sending mail with inquiry thanks mail"
  • Text Field: Enter the form ID to be targeted by the trigger

Available Variables

Variable NameTypeDescription
$bodyStringEmail body content

Return Values

Variable NameTypeDescription
$bodyStringEmail body content
$avoid_sendingBooltrue: Do not perform standard email sending
false: Perform standard email sending

API

Clicking the Clear Cache button

You can set it for each API.
When an API has a cache set, it is called when the "Clear Cache" button on the API list is pressed.

How to Specify Components

  • Trigger: Select "Clicking the Clear Cache button"
  • Text Field: Enter the ID of the target API for the trigger

Available Variables

Variable NameTypeDescription
$api_uri_idIntID of the API

GitHub

After Github Deploy request is completed

How to Specify Components

  • Trigger: Select "After Github deploy request is completed"

Available variables

Variable NameTypeDescription
$artifact_hashStringHash value compatible with GitHub Actions

After Github Deploy is completed

How to Specify Components

  • Trigger: Select "After Github deploy is completed"

Available Variables

Variable NameTypeDescription
$kuroco_front_metaObjectMetadata information for KurocoFront

Support

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