The set-date HTTP POST function provides a means to set or update an Keap contact field with a date/time. You can do basic math on these dates, and when used with a date value this is very useful when used in conjunction with Keap’s “Field Timer” tool in the Campaign Builder.
Examples
Set a custom field to 1 month from today
https://yoursite.com/?operation=set-date&auth_key=yourauthkey&target=_YourCustomDateField&function=plus+1+month
Set a custom field to 3 months from today
https://yoursite.com/?operation=set-date&auth_key=yourauthkey&target=_YourCustomDateField&function=plus+3+months
Get value from the source field A, increase it by 1 year and save it in a destination field B
https://yoursite.com/?operation=set-date&auth_key=yourauthkey&source=_customFieldA&target=_customFieldB&function=plus+1+year
If you’d like assistance creating a set-date HTTP POST, contact us at support with the details of what you’d like to achieve, and we’ll help you.
Field Types
Field Timers enable you to schedule a marketing action based on a date field in the contact record. There are two built-in date fields in contact records, the Anniversary and Birthday. You can also create custom fields using the date field type. Only Date fields will work with field timers, Date/Time fields will not work.
For more information on how to setup and use HTTP POSTs, please see “How to Setup HTTP POST”
You can learn more about Campaign Builder Field Timers here.
Parameters
operation– must be set to set-date. This parameter is required.
auth_key – Your HTTP POST auth key. This parameter is required.
source – The field name to use as the start date. If no source is specified, then the current date will be used.
function – (Optional) The amount to change the “source” date by. For example, “plus 1 year”.
format – (Optional) The format of the date output. By default this format is set to match Keap’s data format. If you are pushing the date output to a non Date field, you can modify this to produce the desired format. For guides on the formatting codes, please see this date formatting guide.
target – (Required) the name of the Keap field to place the result.
Other Notes
The contact’s fields will be automatically synchronized after the target field is updated.
Support
If you need assistance creating a set-date HTTP POST URL, please let us know and we’ll be glad to help.