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.
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 Name | Type | Description |
---|---|---|
$ext_config | Object (ext_config) | Content extension settings |
Return Values
Variable Name | Type | Description | Sample |
---|---|---|---|
$filters | Object | Filter conditions | {"filter":"subject contain SomeText","order:"subject=ASC"} For more information, refer to How to Use the Search Function. |
$disable_columns | Array | Keys of items to be hidden | ["ymd", ... ] |
$default_columns | Array | Key name, display name, and sorting of items to be displayed by default | [{"key_name":"topics_id","disp_name":"TOPICS ID","sortable":true}, ...] |
$errors | String 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 Name | Type | Description |
---|---|---|
$row | Object | Data from the form |
Return Values
Variable Name | Type | Description |
---|---|---|
$row | Object | Data 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content ID |
$ext_config | Object (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 Name | Type | Description |
---|---|---|
$row | Object | Data from the form |
Return Values
Variable Name | Type | Description |
---|---|---|
$row | Object | Data 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content 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 Name | Type | Description |
---|---|---|
$row | Object | Data 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content 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 Name | Type | Description |
---|---|---|
$row | Object | Data from the form |
Return Values
Variable Name | Type | Description |
---|---|---|
$row | Object | Data 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 Name | Type | Description |
---|---|---|
$topics_id | Int | Content ID |
$draftId | Int | In-progress data ID |
$topicsData | Object | Article data |
$ext_config | Object (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 Name | Type | Description |
---|---|---|
$row | Object { 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 Name | Type | Description |
---|---|---|
$topics_id | Int | Content ID |
$draftId | Int | In-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 Name | Type | Description |
---|---|---|
$copy_topics_id | Int | ID of the source content to be copied |
$copy_topics_data | Object | Data to be copied |
Return Values
Variable Name | Type | Description |
---|---|---|
$data | Object | Data 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 Name | Type | Description |
---|---|---|
$row | Object | Data from the form |
Return Values
Variable Name | Type | Description |
---|---|---|
$row | Object | Data 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content 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 Name | Type | Description |
---|---|---|
$row | Object | Data from the form |
Return Values
Variable Name | Type | Description |
---|---|---|
$row | Object | Data 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content 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 Name | Type | Description |
---|---|---|
$row | Object | Data from the form |
Return Values
Variable Name | Type | Description |
---|---|---|
$row | Object | Data 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content 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 Name | Type | Description |
---|---|---|
$topics_id | Int | Content ID |
$ext_config | Object (ext_config) | Content extension settings |
$open_flg | Int | 1: 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 name | Type | Description |
---|---|---|
$topics_id | Int | Content ID |
$ext_config | Object (ext_config) | ontent extension settings |
$uploaded_row | Object | Row data at CSV upload |
Return values
Variable name | Type | Description |
---|---|---|
$errors | Object {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 Name | Type | Description |
---|---|---|
$update_topics_ids | Int[] | 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 Name | Type | Description |
---|---|---|
$update_topics_ids | Int[] | Array of updated content IDs |
$insert_topics_ids | Int[] | Array of added content IDs |
$ext_config | Object (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 name | Type | Description |
---|---|---|
$topics_id | Int | Content 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 name | Type | Description |
---|---|---|
$topics_category_id | Int | Content category ID |
$topics_category_data | Object | Information 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 name | Type | Description |
---|---|---|
$topics_category_id | Int | Content category ID |
$topics_category_data | Object | Information of the updated category |
Master
After adding master
How to specify components
- Trigger: Select "After adding master"
Available variables
Variable name | Type | Description |
---|---|---|
$csvtable_id | Int | Master ID |
After updating master
How to specify components
- Trigger: Select "After updating master"
Available variables
Variable name | Type | Description |
---|---|---|
$csvtable_id | Int | Master ID |
After deleting master
How to specify components
- Trigger: Select "After deleting master"
Available variables
Variable name | Type | Description |
---|---|---|
$csvtable_id | Int | Master ID |
Member
Before member registration
How to specify components
- Trigger: Select "Before member registration"
Available variables
Variable name | Type | Description |
---|---|---|
$row | Object {member_id: Int, name1: String, ...} | Member information |
Return values
Variable name | Type | Description |
---|---|---|
$row | Object {member_id: Int, name1: String, ...} | Member information |
Before updating member information
How to specify components
- Trigger: Select "Before updating member information"
Available variables
Variable name | Type | Description |
---|---|---|
$row | Object {member_id: Int, name1: String, ...} | Member information |
After member registration
How to specify components
- Trigger: Select "After member registration"
Available variables
Variable name | Type | Description |
---|---|---|
$member_id | Int | Member ID |
After updating member information
How to specify components
- Trigger: Select "After updating member information"
Available variables
Variable name | Type | Description |
---|---|---|
$member_id | Int | Member ID |
Before member verification
How to specify components
- Trigger: Select "Before member verification"
Available variables
Variable name | Type | Description |
---|---|---|
$member_id | Int | Member ID |
$formData | Object {member_id: Int, name1: String, ...} | Member input information |
$memberExtensionColumns | Object[] [{ disp_name: String, key_name:String, type:String, ...}, ...] | Member input field |
Return values
Variable name | Type | Description |
---|---|---|
$errors | Object {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 name | Type | Description |
---|---|---|
$row | Object {member_id: Int, name1: String, ...} | Member information |
Return values
Variable name | Type | Description |
---|---|---|
$row | Object {member_id: Int, name1: String, ...} | Member information |
$errors | String[] | Error string array |
After batch member upload
How to specify components
- Trigger: Select "After batch member upload"
Available variables
Variable name | Type | Description |
---|---|---|
$member_ids | Int[] | List of updated member IDs |
Tag
After adding tag
How to specify components
- Trigger: Select "After adding tag"
Available variables
Variable name | Type | Description |
---|---|---|
$tag_id | Int | Tag ID |
$tagData | Object {tag_id: Int, tag_nm: String, ...} | Tag information |
After updating tag
How to specify components
- Trigger: Select "After updating tagr"
Available variables
Variable name | Type | Description |
---|---|---|
$tag_id | Int | Tag ID |
$tagData | Object {tag_id: Int, tag_nm: String, ...} | Tag information |
Before tag validation
How to specify components
- Trigger: Select "Before tag validation"
Available variables
Variable name | Type | Description |
---|---|---|
$tag_id | Int | Tag ID |
Return values
Variable name | Type | Description |
---|---|---|
$errors | Object {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 Name | Type | Description |
---|---|---|
$comment_header_id | Int | Comment header ID |
Return Value
Variable Name | Type | Description |
---|---|---|
$errors | Array [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 Name | Type | Description |
---|---|---|
$comment_header_id | Int | Comment header ID |
$comment_id | Int | Comment 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 Name | Type | Description |
---|---|---|
$comment_header_id | Int | Comment header ID |
$comment_id | Int | Comment ID |
E-commerce
After running inventory check logic
How to specify components
- Trigger: Select "After running inventory check logic"
Available variables
Variable name | Type | Description |
---|---|---|
$cart_items | Object {Product ID: { product_name: String, topics_name:String, ...}, ...} | Items in shopping cart |
$products | Object { topics_name:String, ...} | Product information |
Return values
Variable name | Type | Description |
---|---|---|
$errors | Object {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 Name | Type | Description |
---|---|---|
$order_id | Int | Order number |
$customerId | Int | Member ID of the purchaser |
$name1 | String | Last name of the purchaser |
$name2 | String | First name of the purchaser |
$group_list | Object { topics_name:String, ...} | Group information of the purchaser |
$member_data | Object { name1: String, name2: String, email: String, ...} | Member data of the purchaser |
$order_info | Object { 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_options | Object {payment_method_id: Payment method, ....} | List of payment methods with ID as the key |
$products | Object { product_name:String, product_id:Int, topics_name:String, topics_id:Int, price:Number, quantity:Int, ...} | Information of purchased products |
$product_ids | Array | Array of product IDs |
$is_exists_download_product | Int | 1: 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 Name | Type | Description |
---|---|---|
$order_id | Int | Order number |
$customerId | Int | Member ID of the purchaser |
$name1 | String | Last name of the purchaser |
$name2 | String | First name of the purchaser |
$group_list | Object { topics_name:String, ...} | Group information of the purchaser |
$member_data | Object { name1: String, name2: String, email: String, ...} | Member data of the purchaser |
$order_info | Object { 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_options | Object {payment_method_id: Payment method, ....} | List of payment methods with ID as the key |
$products | Object { product_name:String, product_id:Int, topics_name:String, topics_id:Int, price:Number, quantity:Int, ...} | Information of purchased products |
$product_ids | Array | Array of product IDs |
$is_exists_download_product | Int | 1: 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 name | Type | Description |
---|---|---|
$login_email | String | E-mail address or login ID |
$login_member_id | Int | Member ID |
$login_save | Bool | Maintain login status |
$is_login | Bool | Allow login |
$custom_search_ids | Int[] | Permission for user logging in |
Befor API logging in
How to Specify Components
- Trigger: Select "Befor API logging in"
Return Values
Variable Name | Type | Description |
---|---|---|
$errors | String[] | Error messages; if set, login will fail |
$is_login | Bool | true: 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 name | Type | Description |
---|---|---|
$is_login | Bool | Allow login |
$auto_login | Bool | Save login |
$custom_search_ids | Int[] | Permission for user logging in |
$member_id | Int | Member ID |
Return values
Variable name | Type | Description |
---|---|---|
$is_login | Bool | Allow login |
$auto_login | Bool | Save login |
$custom_search_ids | Int[] | Permission for user logging in |
After changing password using reminder
Specifying the Component
- Trigger: Select "After changing password using reminder"
Available variables
Variable name | Type | Description |
---|---|---|
$member_id | Int | Member 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 name | Type | Description |
---|---|---|
$module_nm | String | Module name |
$module_id | Int | Module 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 name | Type | Description |
---|---|---|
$module_nm | String | Module name |
$module_id | Int | Module ID |
$approvalflow_apply | Object {approvalflow_id: Int, draft_id: Int, ...} | Application information |
$nextApply | Object {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 name | Type | Description |
---|---|---|
$module_nm | String | Module name |
$module_id | Int | Module 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 name | Type | Description |
---|---|---|
$magazine_data | Object {magazine_id: Int, magazine_name: String, ...} | Notification details |
$destination | Int[] | Member search condition ID(s) of the recipient(s) |
$search_condition_list | String[] | Member search conditions of the recipient(s) |
$preview_flg | Bool | true when pre-verified on the admin panel |
Return values
Variable name | Type | Description |
---|---|---|
$additional_member_ids | Int[] | 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 name | Type | Description |
---|---|---|
$mail_header | String | Message header |
$subject | String | Subject line |
$body | String | Message body (HTML) |
$body_plain | String | Message body (text) |
$can_send | Bool | Allow delivery |
$member_id | Int | Member ID |
$magazine_data | Object {magazine_id: Int, magazine_name: String, ...} | Notification details |
Return values
Variable name | Type | Description |
---|---|---|
$mail_header | String | Message header |
$subject | String | Subject line |
$body | String | Message body (HTML) |
$body_plain | String | Message body (text) |
$can_send | Bool | Allow delivery |
$member | Object {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 name | Type | Description |
---|---|---|
$member_info | Object {member_id: Int, name1: String, ...} | Recipient information |
$magazine_info | Object {magazine_id: Int, magazine_name: String, ...} | Notification details |
Return values
Variable name | Type | Description |
---|---|---|
$substitutions | Object {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 Name | Type | Description |
---|---|---|
$header | String[] | 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 |
$row | String[] | 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 Name | Type | Description |
---|---|---|
$header | String[] | Associative array of header strings. Specify as the return value to change the header strings if needed. |
$row | String[] | Associative array of CSV strings. Specify as the return value to change the CSV content if needed |
$errors | String 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 Name | Type | Description |
---|---|---|
$payload | String | JSON string containing email content and parameters |
Return Values
Variable Name | Type | Description |
---|---|---|
$is_mail_sent | Bool | true: 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 Name | Type | Description |
---|---|---|
$body | String | Email body content |
Return Values
Variable Name | Type | Description |
---|---|---|
$body | String | Email body content |
$avoid_sending | Bool | true: 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 Name | Type | Description |
---|---|---|
$body | String | Email body content |
Return Values
Variable Name | Type | Description |
---|---|---|
$body | String | Email body content |
$avoid_sending | Bool | true: 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 Name | Type | Description |
---|---|---|
$api_uri_id | Int | ID 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 Name | Type | Description |
---|---|---|
$artifact_hash | String | Hash value compatible with GitHub Actions |
After Github Deploy is completed
How to Specify Components
- Trigger: Select "After Github deploy is completed"
Available Variables
Variable Name | Type | Description |
---|---|---|
$kuroco_front_meta | Object | Metadata information for KurocoFront |
Related Documents
Support
If you have any other questions, please contact us or check out Our Slack Community.