Webhooks: Library

  • Updated

Date Webhooks

date_plus

Calculate a date in the future given a starting date and number of days.

in: date, days
return variable: date_plus 

Example:

  • Add this webhook URL to My Apps:
https://zingtree.com/apps/webhook/filters/date_plus.php?days=#day_interval#&date=#date#
  • Collect a date with the variable of #date#
  • Collect a number of days with the variable of #days#
  • The return variable of the number of days from the date is #date_plus#

If you do not want to collect the number of days, instead set a value for the number of days in the URL to always use in the calculation (replace 30 with your number):

https://zingtree.com/apps/webhook/filters/date_plus.php?days=30&date=#date#

Attach your webhook to a node that follows the data collection. To display the result in the content, use the return variable of #date_plus#.

 


date_reformat
reformats a date to a new format
in: date, format, var
return variable: The variable named in the var parameter

Example:
https://zingtree.com/apps/webhook/filters/date-reformat.php?var=new_date&format=F+j,+Y&date=2019-10-22

Note: Date Formats can be found here.


date_difference
calculate the number of days between dates
in: date1, date2, var
return variable: the variable name in the var parameter

Example:
https://zingtree.com/apps/webhook/filters/date_difference.php?date1=2020-04-01&date2=2019-04-01&var=diff

 

date_plus_business_days
Add days BUSINESS days to a date, and return the variable as new_date. This ignores weekends and holidays
in: date, days
return variable: new_date
https://zingtree.com/apps/webhook/filters/date_plus_business_days.php?days=3&date=2019-08-23

days_from_today
Determine the number of days from today for a given date
in: date
return variable: days_from_today

Example:
https://zingtree.com/apps/webhook/filters/days_from_today.php?date=#date#&date_format=m/d/Y


date to age
given a birthdate, returns the age of a person born on that date
in: date, result
return variable: The variable named in result.
https://zingtree.com/apps/webhook/lib/date-to-age.php?result=age&date=1970-03-01
More information

 

Other Utility Webhooks


inspector
returns data send into the webhook. Useful for debugging or learning more about how webhooks work.

return variables: whatever was passed into the webhook

Example:
https://zingtree.com/apps/webhook/lib/inspector.php

multiline-split
Adds line breaks to multi-line text variables
in: the current session - specify as #session#
return variables: All variables in the current session, adding line breaks.

Example:
https://zingtree.com/apps/webhook/lib/multiline-split.php?session=#session#


random
webhook to return a random number - used for verification. Specify the number of digits (4 is default)
in: digits
return variable: random_number

Example:
https://zingtree.com/apps/webhook/lib/random.php?digits=6

 

More

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Ticket

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community