Macros - the describtion

Created: 2019-04-24
Last updated: 2019-04-24

Post view count: 2338

In macros we can use options described below:
Sugester.send_sms(to, text)
Sugester.send_email(email_to, subject, body)
Sugester.create_task.(title, content, attributes)
Sugester.create_client(attributes)
Sugester.add_contact(client_id, attributes)
Sugester.update_client(client_id, attributes)
Sugester.update_deal(deal_id, attributes)
Sugester.update_post(post_id, attributes)
Sugester.create_action(name, macro, scheduled_time)

Macros are written in JavaScript and work with basic JavaScript language.

Additionally, we can use special auxiliary functions for time:

Utils.add_days(1) - sets the date in 1 day
Utils.add_days(-2) - sets the date before 2 days
Utils.add_hours(5) - sets the date and time in 5 hours
Utils.add_minutes(5) - sets the date and time in 5 minutes
Utils.add_days(-1, post.deadline) - sets the date 1 day before the task's deadline



Back


Add Comment