Mautic Community Forums

Update Contact Field with NOW datestamp

Your software
My Mautic version is: 2.14.2
My PHP version is: 7.0

OVERVIEW

I’m using the Points trigger to put contacts into this campaign if they attain over 99 points. Then it runs through this logic to update the handraise field so our Sales team gets an alert from Salesforce to call the contact. We need to also show the last date that the handraise field changed so they know how long ago they hit that amount of points.

Here’s a screenshot of the campaign that is running this.

THE PROBLEM

In a campaign, I’m using the “Update Contact” action to set a value on the contact’s profile. The value I’d like to set is the datestamp of whenever this action triggers. I was hoping that if put the “NOW” keyword into that field then it would pickup the datestamp of whenever that action was triggered. But it is just setting the value to that datestamp of when I updated the action in the campaign.

This is what I entered on the action:

After saving the action then editing it again the value looks like this:

So when the campaign triggers it will always update the contact field with the “2019-12-03 22:30:24”.

Is there any way to do this? I just need to update Salesforce with the datestamp of when that—also shown in the screenshot above—“Handraise” field was last updated.

I’m open to other options to get those fields updated. Once they are updated it’s no problem to get them into Salesforce.