1"use strict";(self.webpackChunkkurokuro=self.webpackChunkkurokuro||[]).push([["32132"],{1636:function(e,t,n){n.r(t),n.d(t,{metadata:()=>i,default:()=>m,frontMatter:()=>r,contentTitle:()=>d,toc:()=>c,assets:()=>l});var i=JSON.parse('{"id":"tutorials/implement-reminder-and-automatic-deletion-of-members","title":"Implementing Reminder and Automatic Withdrawal Features for Members with No Login for a Certain Period","description":"Implement reminder and automatic withdrawal features for members with no login for a certain period using batch processing. The feature to extend the expiration date when a member logs in will be implemented using custom processing triggered by \\"after login processing\\".","source":"@site/docs/tutorials/implement-reminder-and-automatic-deletion-of-members.md","sourceDirName":"tutorials","slug":"/tutorials/implement-reminder-and-automatic-deletion-of-members","permalink":"/docs/tutorials/implement-reminder-and-automatic-deletion-of-members","draft":false,"unlisted":false,"editUrl":"https://github.com/diverta/kuroco-documents/tree/main/packages/create-docusaurus/templates/shared/docs/tutorials/implement-reminder-and-automatic-deletion-of-members.md","tags":[],"version":"current","frontMatter":{"title":"Implementing Reminder and Automatic Withdrawal Features for Members with No Login for a Certain Period","description":"Implement reminder and automatic withdrawal features for members with no login for a certain period using batch processing. The feature to extend the expiration date when a member logs in will be implemented using custom processing triggered by \\"after login processing\\"."},"sidebar":"documentationSidebar","previous":{"title":"Creating daily backup data in CSV using Batch Process","permalink":"/docs/tutorials/how-to-implement-batch-function-exports-csv"},"next":{"title":"Automatically Delete Files in File Manager","permalink":"/docs/tutorials/delete-filemanager-files-by-using-smarty-plugins"}}'),s=n(74848),a=n(28453);let r={title:"Implementing Reminder and Automatic Withdrawal Features for Members with No Login for a Certain Period",description:'Implement reminder and automatic withdrawal features for members with no login for a certain period using batch processing. The feature to extend the expiration date when a member logs in will be implemented using custom processing triggered by "after login processing".'},d,l={},c=[{value:"Overview",id:"overview",level:2},{value:"What you'll learn",id:"what-youll-learn",level:3},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Prerequisites",id:"prerequisites-1",level:2},{value:"Set the expiration date for member login permission",id:"set-the-expiration-date-for-member-login-permission",level:3},{value:"Creating an API for internal processing",id:"creating-an-api-for-internal-processing",level:3},{value:"Creating an API",id:"creating-an-api",level:4},{value:"Security settings",id:"security-settings",level:4},{value:"CORS settings",id:"cors-settings",level:4},{value:"Implementation of Reminder Feature",id:"implementation-of-reminder-feature",level:2},{value:"Creating a Custom Member Filter",id:"creating-a-custom-member-filter",level:3},{value:"Create notification",id:"create-notification",level:3},{value:"Create message template",id:"create-message-template",level:3},{value:"Create custom function",id:"create-custom-function",level:3},{value:"Create endpoint",id:"create-endpoint",level:3},{value:"Create batch process",id:"create-batch-process",level:3},{value:"Operation check",id:"operation-check",level:3},{value:"Implementation of Automatic Withdrawal Feature",id:"implementation-of-automatic-withdrawal-feature",level:2},{value:"Creating a Custom Member Filter",id:"creating-a-custom-member-filter-1",level:3},{value:"Create endpoints",id:"create-endpoints",level:3},{value:"<code>delete_member_list</code> endpoint",id:"delete_member_list-endpoint",level:4},{value:"<code>expired_member_delete</code> endpoint",id:"expired_member_delete-endpoint",level:4},{value:"Create batch process",id:"create-batch-process-1",level:3},{value:"Operation check",id:"operation-check-1",level:3},{value:"Implementation of the feature to extend the expiration date when a member logs in",id:"implementation-of-the-feature-to-extend-the-expiration-date-when-a-member-logs-in",level:2},{value:"Create endpoint",id:"create-endpoint-1",level:3},{value:"Create custom function",id:"create-custom-function-1",level:3},{value:"Operation check",id:"operation-check-2",level:3},{value:"Related documents",id:"related-documents",level:2}];function o(e){let t={a:"a",admonition:"admonition",br:"br",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(t.p,{children:["Using batch processing, we will implement reminder and automatic withdrawal features for members who have not logged in for a certain period.",(0,s.jsx)(t.br,{}),'\nAlso, the feature to extend the expiration date when a member logs in will be implemented using custom processing triggered by "after login processing".']}),"\n",(0,s.jsx)(t.h3,{id:"what-youll-learn",children:"What you'll learn"}),"\n",(0,s.jsx)(t.p,{children:"We will implement reminder and automatic withdrawal features for members who have not logged in for a certain period using the following steps."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#prerequisites",children:"Prerequisites"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#implementation-of-reminder-feature",children:"Implementation of Reminder Feature"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#implementation-of-automatic-withdrawal-feature",children:"Implementation of Automatic Withdrawal Feature"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"#implementation-of-the-feature-to-extend-the-expiration-date-when-a-member-logs-in",children:"Implementation of the feature to extend the expiration date when a member logs in"})}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(t.p,{children:"Members and groups to be used for testing will be added as
1necessary."}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites-1",children:"Prerequisites"}),"\n",(0,s.jsx)(t.h3,{id:"set-the-expiration-date-for-member-login-permission",children:"Set the expiration date for member login permission"}),"\n",(0,s.jsxs)(t.p,{children:["The expiration date for member login permission will be automatically added by the custom processing that we will set up later, but for the purpose of testing, let's set it manually first.",(0,s.jsx)(t.br,{}),"\nClick [Member] -> [Member]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/f7d9bb1ae015c27df925f9c82c42b6fe.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/f7d9bb1ae015c27df925f9c82c42b6fe.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:'On the member list page, click the gear icon in the top right corner of the table to open the "Display Settings" and add the "Login permission deadline" field.'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/c85ce4f2669513cb69e9651f3f3537a5.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/c85ce4f2669513cb69e9651f3f3537a5.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click on the name of the member whose settings you want to change on the member list."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/1c016e36d91ba656b7f951d3f66deff1.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/1c016e36d91ba656b7f951d3f66deff1.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Set the login permission expiry date."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/05b293b84a1a70ca9bf8ce99cc465b3e.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/05b293b84a1a70ca9bf8ce99cc465b3e.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsxs)(t.p,{children:['Confirm that the "Don\'t subscribe to notifications" is unchecked.\n',(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/f8265de19ae3cf5b3ed839368163d783.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/f8265de19ae3cf5b3ed839368163d783.png",alt:"Image from Gyazo"})]}),"\n",(0,s.jsx)(t.p,{children:"Similarly, set the login permission expiration date for the member used for testing as follows."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/ef6aa86abfa6b5da1b2da92c62c5465f.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/ef6aa86abfa6b5da1b2da92c62c5465f.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h3,{id:"creating-an-api-for-internal-processing",children:"Creating an API for internal processing"}),"\n",(0,s.jsx)(t.p,{children:"It is recommended to separate APIs that are only used internally within Kuroco. Therefore, first create a new API for internal use. If it has already been added, you can skip to the next step."}),"\n",(0,s.jsx)(t.h4,{id:"creating-an-api",children:"Creating an API"}),"\n",(0,s.jsx)(t.p,{children:"Click [Add] from the API section in the Kuroco admin panel."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/9ecf385ebd0bbd4ed2fce44c5b03908a.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/9ecf385ebd0bbd4ed2fce44c5b03908a.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsxs)(t.p,{children:['On the API editor, enter the following information and click "Add".\n',(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/4ad1441b5747037b667256ac969fa60a.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/4ad1441b5747037b667256ac969fa60a.png",alt:"Image from Gyazo"})]}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Field"}),(0,s.jsx)(t.th,{children:"Settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Title"}),(0,s.jsx)(t.td,{children:"Internal"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Version"}),(0,s.jsx)(t.td,{children:"1.0"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Description"}),(0,s.jsx)(t.td,{children:"API for internal use"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"The API has been created."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/42d21c717bec7d592b968486a036da90.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/42d21c717bec7d592b968486a036da90.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h4,{id:"security-settings",children:"Security settings"}),"\n",(0,s.jsx)(t.p,{children:"Next, configure the security settings. Click on [Security]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/02b9bb7afc1ef03a4f26f524267c76a8.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/02b9bb7afc1ef03a4f26f524267c76a8.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Set the security to [Dynamic Access Token], then click [Save]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/0a121f90acd9ef3c1494cd895d922dae.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/0a121f90acd9ef3c1494cd895d922dae.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsxs)(t.p,{children:["After setting the security to [Dynamic Access Token], it is recommended to use the ",(0,s.jsx)(t.code,{children:"Login::token"})," endpoint. However, if it is only used internally, you can ignore it."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/8ab8a67d5768bf7d84e6e8dc79753de1.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/8ab8a67d5768bf7d84e6e8dc79753de1.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h4,{id:"cors-settings",children:"CORS settings"}),"\n",(0,s.jsx)(t.p,{children:"Next, configure the CORS settings. Click on [Operation CORS]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/706501419568a0dc13e7312f83da4fd4.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/706501419568a0dc13e7312f83da4fd4.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add Origin] in CORS_ALLOW_ORIGINS, and add the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Admin panel URL"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Click [Add Method] in CORS_ALLOW_METHODS, and add the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"GET"}),"\n",(0,s.jsx)(t.li,{children:"POST"}),"\n",(0,s.jsx)(t.li,{children:"OPTIONS"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Make sure that [Allow Credentials] is checked in CORS_ALLOW_CREDENTIALS."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/edf857331a01a33515297413a4ac2314.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/edf857331a01a33515297413a4ac2314.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"If there are no issues, click [Save]."}),"\n",(0,s.jsx)(t.h2,{id:"implementation-of-reminder-feature",children:"Implementation of Reminder Feature"}),"\n",(0,s.jsx)(t.p,{children:"The reminder function works in the following way:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Send a request to the endpoint by batch processing every day at 06:00."}),"\n",(0,s.jsx)(t.li,{children:"The endpoint sends information on the message template identifier and custom member filter ID to the configured delivery ID."}),"\n",(0,s.jsx)(t.li,{children:"The delivery sends the contents of the message template to the custom member filter."}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"creating-a-custom-member-filter",children:"Creating a Custom Member Filter"}),"\n",(0,s.jsxs)(t.p,{children:["We set the recipients for the reminder email with a custom member filter.",(0,s.jsx)(t.br,{}),"\nClick [Member] -> [Custom Member Filter]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/b0087d194aab23c0b9a7be46e67580a2.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/b0087d194aab23c0b9a7be46e67580a2.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/4c5a9046ce53aac37b281e07ba527f86.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/4c5a9046ce53aac37b281e07ba527f86.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsxs)(t.p,{children:["Create the following filter:",(0,s.jsx)(t.br,{}),"\nThe recipients of the reminder email are those whose expiration date is 30 days prior and less than 7 days."]}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Title"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Login permission expiry date reminding target members"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Filter"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"As below"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/af99650dc93055e6115b71fc7f9e8123.jpg?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/af99650dc93055e6115b71fc7f9e8123.jpg",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [View result] to see if the members you expect will hit.\nIf you have multiple conditions, check the test member's login permit manually and check it."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/5a56aaefc823a2b4f35e80b90dfe933b.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/5a56aaefc823a2b4f35e80b90dfe933b.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsxs)(t.p,{children:["If there is no problem, click [Add] to add a custom member filter.",(0,s.jsx)(t.br,{}),"\nThe ID of the created custom menber filter will be used later, so make a note of it."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/89e55969dc027aaa3c41dff40df10cb2.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/89e55969dc027aaa3c41dff40df10cb2.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h3,{id:"create-notification",children:"Create notification"}),"\n",(0,s.jsxs)(t.p,{children:["We use the notification function for sending reminder email.",(0,s.jsx)(t.br,{}),"\nClick [Channels] -> [Bulk Notification]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/2094347a9b733759b77c2de8f494517f.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/2094347a9b733759b77c2de8f494517f.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/5d8d37e7f82dff4fe1967a3c7e1c3724.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/5d8d37e7f82dff4fe1967a3c7e1c3724.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Enter as follows:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Reminder of login permission expiry"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Sender"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"[email protected]"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Other settings"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"as default"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/284530af0d12e4ebac686794ba459201.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/284530af0d12e4ebac686794ba459201.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Recipients will be set in the batch process later so you can leave it empty for now."}),"\n",(0,s.jsxs)(t.li,{children:["If you want to change the sender's email address, link y
1our Kuroco site with Sendgrid referring to ",(0,s.jsx)(t.a,{href:"/docs/tutorials/how-to-link-sendgrid/",children:"How to link Sendgrid"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"After setting, click [Add] to add the notification and make a note for the notification ID."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/87af67077d54b0e0043f632242fec362.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/87af67077d54b0e0043f632242fec362.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h3,{id:"create-message-template",children:"Create message template"}),"\n",(0,s.jsxs)(t.p,{children:["We use message template to create the text of reminder message.",(0,s.jsx)(t.br,{}),"\nClick [Operation] > [Message template]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/df2a6ba9aacf5414b6d8d6dce419c497.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/df2a6ba9aacf5414b6d8d6dce419c497.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/9b1ae815c846adceb23319ed6ce0d810.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/9b1ae815c846adceb23319ed6ce0d810.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Enter as follows:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Template"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"login permission expiry remind template"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Identifier"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"expiration_remind_template"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Body"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"As below"})]})]})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-html",children:"Dear %name1% %name2% <br>\n<br>\nYour login permission will expire on %login_ok_ymd%.<br>\nPlease login before the expiry date.\n"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/8409ccbf5873c96c1f089ceb6dd959a1.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/8409ccbf5873c96c1f089ceb6dd959a1.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"After setting, click [Add] to save the message template."}),"\n",(0,s.jsx)(t.h3,{id:"create-custom-function",children:"Create custom function"}),"\n",(0,s.jsxs)(t.p,{children:["If you enter ",(0,s.jsx)(t.code,{children:"%name1%"})," and ",(0,s.jsx)(t.code,{children:"%name2%"})," in the notification message, you can display the name of the member of the destination, but if you want to add items that are not available by default such as ",(0,s.jsx)(t.code,{children:"%login_ok_ymd%"})," or complicated processing, you need to use custom function."]}),"\n",(0,s.jsx)(t.p,{children:"Click [Operation] -> [Custom function]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/25dc5649ab2fc103cdcf869df1733a62.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/25dc5649ab2fc103cdcf869df1733a62.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/52169f762d9ea4abf1d05bb56d553906.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/52169f762d9ea4abf1d05bb56d553906.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Enter as follows:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Notification substitution"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Identifier"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"notification_substitution"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Used by component(s)"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["Trigger\uFF1ANotification substitution",(0,s.jsx)(t.br,{}),"value: ID of the notification(2)"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Process"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Enter the code below"})]})]})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-smarty",children:"{assign_array var=substitutions values=''}\n{assign var=substitutions.name1 value=$member_info.name1}\n{assign var=substitutions.name2 value=$member_info.name2}\n{assign var=substitutions.login_ok_ymd value=$member_info.login_ok_ymd|date_format:'Y-m-d'}\n"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/237b6e347bd234813f1a2d6eeb6f7f4c.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/237b6e347bd234813f1a2d6eeb6f7f4c.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"After setting, click [Add] to save the custom function."}),"\n",(0,s.jsx)(t.h3,{id:"create-endpoint",children:"Create endpoint"}),"\n",(0,s.jsxs)(t.p,{children:["Next, we create the endpoint.",(0,s.jsx)(t.br,{}),"\nClick [Add new endpoint] from the Internal API page."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/1b1ecdd7d0d8b070db1c810258a8fdca.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/1b1ecdd7d0d8b070db1c810258a8fdca.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Create the following endpoint:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"expiration_remind"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Category"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"notification"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Model"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Magazine"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Operation"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"send"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"destination_id"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Custom member filter ID(1)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"mail_type"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"1"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"mail_template_name"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Identifier of the message template(expiration_remind_template)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"subject"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Your login permission is expiring soon"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/851397d6c5a607eba9d13537f1aefe9b.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/851397d6c5a607eba9d13537f1aefe9b.png",alt:"Image from Gyazo"}),"\n",(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/3775d8d97f8aad9ed9dee509a7100b8d.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/3775d8d97f8aad9ed9dee509a7100b8d.png",alt:"Image from Gyazo"})]}),"\n",(0,s.jsx)(t.p,{children:"After setting, click[Add] to add the endpoint."}),"\n",(0,s.jsx)(t.h3,{id:"create-batch-process",children:"Create batch process"}),"\n",(0,s.jsxs)(t.p,{children:["We create a reminding function using batch process and send the reminder message to target members daily.",(0,s.jsx)(t.br,{}),"\nClick [Operation] -> [Batch process]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/1ecfae69bcffdbcdacbab103904db3ad.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/1ecfae69bcffdbcdacbab103904db3ad.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/8eb644facfb5c12cf04a8484ebbdccb5.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/8eb644facfb5c12cf04a8484ebbdccb5.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Set as follows:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Send reminder of login permission expiry"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Identifier"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"send_remind_mail"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Batch"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Every day 06:00"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Process"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Below code"})]})]})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-smarty",children:"{api_internal\n var='response'\n status_var='status'\n endpoint='/rcms-api/4/expiration_remind/2'\n method='POST'\n member_id='1'\n}\n"})}),"\n",(0,s.jsx)(t.admonition,{type:"caution",children:(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"/rcms-api/4/expiration_remind/2"})," with your own endpoint."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/711ccbac44f2e0742f24184e1ec9dbe8.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/711ccbac44f2e0742f24184e1ec9dbe8.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"After setting, click [Add] to save the batch process."}),"\n",(0,s.jsx)(t.h3,{id:"operation-check",children:"Operation check"}),"\n",(0,s.jsx)(t.p,{children:"At last, click [Run now] to check the operation."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/a14bce742588cd54b516322a008bd6e0.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/a14bce742588cd54b516322a008bd6e0.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"If the settings are correct, below e-mail will be sent."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/e93cd0d2656eb1d7f7dc98ee92421c0e.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/e93cd0d2656eb1d7f7dc98ee92421c0e.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h2,{id:"implementation-of-automatic-withdrawal-feature",children:"Implementation of Automatic Withdrawal Feature"}),"\n",(0,s.jsxs)(t.p,{children:["We create the automatic member delete function using batch process which checks for the existence of target members on a daily basis, and if the target members exist, deletes them using the ",(0,s.jsx)(t.code,{children:"Member::delete"})," endpoint."]}),"\n",(0,s.jsx)(t.h3,{id:"creating-a-custom-member-filter-1",children:"Creating a Custom Member Filter"}),"\n",(0,s.jsxs)(t.p,{children:["We use the custom member filter to identify the target members.",(0,s.jsx)(t.br,{}),"\nClick [Member] -> [Custom Member Filter]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/b0087d194aab23c0b9a7be46e67580a2.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/b0087d194aab23c0b9a7be46e67580a2.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/4c5a9046ce53aac37b281e07ba527f86.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/4c5a9046ce53aac37b281e07ba527f86.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Create the following filter:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"target members of automatic deletion"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Filter"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"As below"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/b7dc6b6fa53e7d3d9908fac14ca5ad3f.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/b7dc6b6fa53e7d3d9908fac14ca5ad3f.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [View result] to check the result and if there are no issues, click [Add] to save the custom member filter."}),"\n",(0,s.jsx)(t.p,{children:"The ID of the created custom member filter will be used later so make a note of it."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/3825e3bd648e737f66bb76ea337329bf.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/3825e3bd648e737f66bb76ea337329bf.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h3,{id:"create-endpoints",children:"Create endpoints"}),"\n",(0,s.jsxs)(t.p,{children:["Create two endpoints, one to return the list of members to be deleted, and one to delete members.",(0,s.jsx)(t.br,{}),"\nClick [Add new endpoint] from the Internal API page."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/1b1ecdd7d0d8b070db1c810258a8fdca.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/1b1ecdd7d0d8b070db1c810258a8fdca.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Create 2 endpoints as follows:"}),"\n",(0,s.jsxs)(t.h4,{id:"delete_member_list-endpoint",children:[(0,s.jsx)(t.code,{children:"delete_member_list"})," endpoint"]}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"delete_member_list"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Category"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Member"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Model"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Member"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Operation"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"list"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"custom_search_id"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Custom member filter ID(3)"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/
1diverta/4cff07a3dd47f2e8f79f57e3d905f92e.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/4cff07a3dd47f2e8f79f57e3d905f92e.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"After setting, click [Add] to save the endpoint settings."}),"\n",(0,s.jsxs)(t.h4,{id:"expired_member_delete-endpoint",children:[(0,s.jsx)(t.code,{children:"expired_member_delete"})," endpoint"]}),"\n",(0,s.jsx)(t.p,{children:"We create the endpoint to delete the target members."}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"expired_member_delete"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Category"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Memmber"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Model"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Member"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Operation"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"delete"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"allowed_group_ids"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Group ID in which target members belong(104)"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/a170e4df1c21e0740c9a84998a92206a.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/a170e4df1c21e0740c9a84998a92206a.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"After setting, click [Add] to save the endpoint settings."}),"\n",(0,s.jsx)(t.h3,{id:"create-batch-process-1",children:"Create batch process"}),"\n",(0,s.jsxs)(t.p,{children:["Next, we create a batch process.",(0,s.jsx)(t.br,{}),"\nClick [Operation] -> [Batch process]."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/1ecfae69bcffdbcdacbab103904db3ad.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/1ecfae69bcffdbcdacbab103904db3ad.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/8eb644facfb5c12cf04a8484ebbdccb5.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/8eb644facfb5c12cf04a8484ebbdccb5.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Set as follows:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Delete members with expired login permission"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Identifier"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"delete_expired_member"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Batch"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Every day 05:00"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Process"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Below code"})]})]})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-smarty",children:"{*Get target members*}\n{api_internal\n var='response'\n status_var='status'\n endpoint='/rcms-api/4/delete_member_list'\n method='GET'\n member_id='1'\n}\n\n{*Delete target members*}\n{foreach from=$response.list item=n}\n {assign var='target' value=\"/rcms-api/4/expired_member_delete/`$n.member_id`\"}\n {* member_id=1 -> admin user *}\n {api_internal\n var='response'\n status_var='status'\n endpoint=$target\n method='POST'\n member_id='1'\n }\n {logger msg1=\"Delete `$n.name1``$n.name2`(member_id=`$n.member_id`)\" msg2=$response}\n{/foreach}\n"})}),"\n",(0,s.jsx)(t.admonition,{type:"caution",children:(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"/rcms-api/4/delete_member_list"})," and ",(0,s.jsx)(t.code,{children:"/rcms-api/4/expired_member_delete/"})," with your own endpoints."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/05e2e44e245c4a0de80a6180fd4bcd7a.jpg?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/05e2e44e245c4a0de80a6180fd4bcd7a.jpg",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"After entering above, click [Add] to save the batch process."}),"\n",(0,s.jsx)(t.h3,{id:"operation-check-1",children:"Operation check"}),"\n",(0,s.jsx)(t.p,{children:"At last, click [Run now] to check the operation."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/95c956775728902a245a1acdc0f88811.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/95c956775728902a245a1acdc0f88811.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"If the setting is correct, the log will remain in the custom log as follows and the members will be deleted."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/48bd94651d66a9303b6bfb453117b1ec.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/48bd94651d66a9303b6bfb453117b1ec.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h2,{id:"implementation-of-the-feature-to-extend-the-expiration-date-when-a-member-logs-in",children:"Implementation of the feature to extend the expiration date when a member logs in"}),"\n",(0,s.jsxs)(t.p,{children:["Finally, we implement a function that automatically extends the expiration date of the login permission after logging in.\nHere, the custom process is performed after the member logging in, and the ",(0,s.jsx)(t.code,{children:"login_ok_ymd"})," is updated at the ",(0,s.jsx)(t.code,{children:"Member::Update"})," endpoint."]}),"\n",(0,s.jsx)(t.h3,{id:"create-endpoint-1",children:"Create endpoint"}),"\n",(0,s.jsx)(t.p,{children:"Click [Add new endpoint] from the Internal API page."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/1b1ecdd7d0d8b070db1c810258a8fdca.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/1b1ecdd7d0d8b070db1c810258a8fdca.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Create the following endpoint:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"member/update_login_ok_ymd"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Category"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Member"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Model"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Member"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Operation"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"update"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"self_only"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"check"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/a9d2ac3a45fb7e11c39e56921ff7cfc6.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/a9d2ac3a45fb7e11c39e56921ff7cfc6.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h3,{id:"create-custom-function-1",children:"Create custom function"}),"\n",(0,s.jsx)(t.p,{children:"Click [Operation] -> [Custom function]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/25dc5649ab2fc103cdcf869df1733a62.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/25dc5649ab2fc103cdcf869df1733a62.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Click [Add]."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/52169f762d9ea4abf1d05bb56d553906.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/52169f762d9ea4abf1d05bb56d553906.png",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.p,{children:"Enter as follows:"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Item"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Settings"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Extend login permission expiry once logging in"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Identifier"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"update_login_permission_date"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Used by component(s)"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["Trigger: After logging in",(0,s.jsx)(t.br,{}),"Value: 0"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Process"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Below code"})]})]})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-smarty",children:'{assign_member_detail assign_group_flg=1 var=\'member_detail\' member_id=$member_id}\n\n{* add extending 1y *}\n{assign_array var="payload" keys="login_ok_ymd" values="1 year"|strtotime|date_format:"Y-m-d"}\n\n{if\n "1"|rcms_in_array:$member_detail.arrGroup_id ||\n "2"|rcms_in_array:$member_detail.arrGroup_id\n}\n {* skip execution when the user supposed to be administrator *}\n{else}\n {* member_id=1 -> admin user *}\n {api_internal\n var=\'response\'\n status_var=\'status\'\n endpoint=\'/rcms-api/4/member/update_login_ok_ymd\'\n method=\'POST\'\n queries=$payload\n member_id=$member_id\n }\n {logger msg1="Update login_ok_ymd of `$member_detail.name1``$member_detail.name2`(member_id=`$member_id`)" msg2=$response}\n{/if}\n'})}),"\n",(0,s.jsx)(t.admonition,{type:"caution",children:(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"/rcms-api/4/member/update_login_ok_ymd"})," with your own endpoint."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/aa2691679dbb0dc8e5df70e70437981e.jpg?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/aa2691679dbb0dc8e5df70e70437981e.jpg",alt:"Image from Gyazo"})}),"\n",(0,s.jsx)(t.h3,{id:"operation-check-2",children:"Operation check"}
1),"\n",(0,s.jsx)(t.p,{children:"Finally, login with the target member's account to check the operation."}),"\n",(0,s.jsxs)(t.p,{children:["If the setting is correct, the log will remain in the custom log as follows and the login permission expiry is updated.",(0,s.jsx)(t.br,{}),"\n",(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/5300e95dc355a565175a3d5368023d9c.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/5300e95dc355a565175a3d5368023d9c.png",alt:"Image from Gyazo"}),"\n",(0,s.jsx)(t.img,{src:"https://t.gyazo.com/teams/diverta/4fe03c2f312405d910e4feb29b85f8aa.png?width=600","data-zoom-src":"https://t.gyazo.com/teams/diverta/4fe03c2f312405d910e4feb29b85f8aa.png",alt:"Image from Gyazo"})]}),"\n",(0,s.jsx)(t.p,{children:"With the above, we have implemented a reminding and automatic withdrawal function to members without login for a certain period of time."}),"\n",(0,s.jsx)(t.h2,{id:"related-documents",children:"Related documents"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/tutorials/using-custom-member-filters/",children:"Using custom member filters"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/reference/trigger-variables/",children:"List of variables available for custom functions"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/faq/how-to-request-kuroco-api-from-smarty-function/",children:"How to request kuroco API from smarty function"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/faq/can-the-original-process-output-logs-for-debugging-purposes/",children:"Can custom function output logs for debugging purposes?"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/reference/smarty-plugin/",children:"Smarty Plugin"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/tutorials/how-to-link-sendgrid/",children:"How to link with SendGrid"})}),"\n"]})]})}function m(e={}){let{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},28453:function(e,t,n){n.d(t,{R:()=>r,x:()=>d});var i=n(96540);let s={},a=i.createContext(s);function r(e){let t=i.useContext(a);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.