Using Actions to update Customer Table
Posted: Fri Jan 22, 2016 4:52 am
Does anyone know if there is a class or method to update the customer table?
I have been trying for days now to update a custom profile (customer) field called LAST_CLICK_DATE with the current date when a recipient clicks on a link in an email.
I have gotten everything working with a velocity script with the exception of being able to set the date variable. I have tried all of the date references I could find but nothing seems to work. Apparently they are dependent on the velocity tools that have been loaded (for which I can't find any reference).
I have tried all of these with no luck:
2016-01-21 21:44:25,115: WARN [http-apr-8080-exec-28] org.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl - Error in velocity script: Error in line 10, column 23: Null reference $date.[]
2016-01-21 20:10:19,968: WARN [http-apr-8080-exec-26] org.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl - Error in velocity script: Error in line 10, column 21: Null reference $date.[]
2016-01-21 21:42:46,520: ERROR [http-apr-8080-exec-25] org.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl - Velocity error
org.apache.velocity.exception.ParseErrorException: Encountered "(" at line 10, column 28 of Company ID 1
Was expecting one of:
<RPAREN> ...
<WHITESPACE> ...
"-" ...
"+" ...
"*" ...
"/" ...
"%" ...
<LOGICAL_AND> ...
<LOGICAL_OR> ...
<LOGICAL_LT> ...
<LOGICAL_LE> ...
<LOGICAL_GT> ...
<LOGICAL_GE> ...
<LOGICAL_EQUALS> ...
<LOGICAL_NOT_EQUALS> ...
<DOT> ...
2016-01-21 20:14:30,341: WARN [http-apr-8080-exec-30] org.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl - Error in velocity script: Error in line 10, column 15: Null reference $dateUtil.[]
2016-01-21 21:34:06,706: WARN [http-apr-8080-exec-21] org.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl - Error in velocity script: Error in line 11, column 23: Null reference $tools.[]
2016-01-21 17:17:46,499: WARN [http-apr-8080-exec-12] org.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl - Error in velocity script: Error in line 10, column 21: Null reference $java.[]
So if anyone knows how to set a variable to the current date (which shouldn't be this freaking hard), please enlighten me.
I have been trying for days now to update a custom profile (customer) field called LAST_CLICK_DATE with the current date when a recipient clicks on a link in an email.
I have gotten everything working with a velocity script with the exception of being able to set the date variable. I have tried all of the date references I could find but nothing seems to work. Apparently they are dependent on the velocity tools that have been loaded (for which I can't find any reference).
I have tried all of these with no luck:
Code: Select all
#set ($current_date = $date.getCurrentDate())
Code: Select all
#set ($current_date = $date)
Code: Select all
#set ($current_date = $date())
org.apache.velocity.exception.ParseErrorException: Encountered "(" at line 10, column 28 of Company ID 1
Was expecting one of:
<RPAREN> ...
<WHITESPACE> ...
"-" ...
"+" ...
"*" ...
"/" ...
"%" ...
<LOGICAL_AND> ...
<LOGICAL_OR> ...
<LOGICAL_LT> ...
<LOGICAL_LE> ...
<LOGICAL_GT> ...
<LOGICAL_GE> ...
<LOGICAL_EQUALS> ...
<LOGICAL_NOT_EQUALS> ...
<DOT> ...
Code: Select all
#set ($current_date = $dateUtil.date())
#set ($current_date = $dateUtil.date)
#set ($date = $dateUtil)
#set ($current_date = $date.getCurrentDate())
Code: Select all
#set ($current_date = $tools.date)
Code: Select all
#set($currentDate = java.util.Date date)
So if anyone knows how to set a variable to the current date (which shouldn't be this freaking hard), please enlighten me.
