Workflow Actions

Workflow actions are the actions that you can associate with a workflow rule. You can create, modify, and delete these actions based on your requirement.

Email Alerts

Imagine you want to send offer mails to customers purchasing over a certain amount. You can create a mail template and map it to the workflow with the invoice amount condition. Whenever an invoice value exceeds your limit, an offer email will be triggered to the customer.

FieldDescription
NameProvide a unique name for the email alert.
ModuleSelect the module for which you wish to create an email alert.
Email TemplateYou can pick a template from the drop-down or click + New Email Template to create a new template.
Email RecipientsPick contacts from the drop-down to whom you wish to send the email alerts.
Additional RecipientsIf you wish to send out email alerts to more people, enter their email addresses separated by a comma.
Please note that you can add a maximum of 10 additional recipients.
  • Navigate to Settings > Automations > Workflow Actions and click +New Email Alert.

  • Fill out the required details and choose your email template.

  • Click Save.


You have now successfully configured an email alert. The email will be triggered to the recipients once the set conditions are met.

Note

  • You can create a maximum of five email alerts for each workflow rule.
  • A maximum of 500 email alerts can be triggered per day.

Actions on email Alerts

Edit Email Alerts

You can modify the email alert and change it into a different email alert.

  • Navigate to Settings > Automations > Workflow Actions and click +New Email Alert.
  • Hover over the email alert and select Edit in the drop-down.

  • Make the required changes and click Save.

Delete Email Alerts

You can delete any email alerts that are no longer useful.

  • Navigate to Settings > Automations > Workflow Actions and click +New Email Alert.
  • Hover over the email alert and select Delete in the drop-down.

  • Click Yes in the pop-up screen to delete the email alert.

Once deleted, email alerts can't be reverted.

Field Updates

Imagine you run an electronic store where you want to assign high value home delivery orders to the senior salesperson in your organization automatically. You can create a field update with the senior salesperson and associate it with the workflow rule. Whenever a home delivery order value exceeds your limit, the sales order will be assigned to the senior salesperson.

FieldDescription
NameGive a unique name for the email alert.
ModuleSelect the module for which you wish to update any specific field.
UpdateSelect the field which you want to update and specify the value in the corresponding box. If you wish to update the field with an empty value, check the box Update with empty value?.
  • Navigate to Settings > Automations > Workflow Actions.
  • Select Field updates and click +New Field Update.

  • Fill out the required details and click Save.

Actions on Field Updates

Modify Field Update

You can modify the field updates.

  • Navigate to Settings > Automations > Workflow Actions and select Field Updates.
  • Hover over the field update and select Edit in the drop-down.

  • Make the required changes and click Save.

Delete Field Update

You can delete the field updates, which is not required.

  • Navigate to Settings > Automations > Workflow Actions and select Field Updates.
  • Hover over the field update and select Delete in the drop-down.

  • Click Yes in the pop-up screen to delete the field update.

Note

  • A maximum of three field updates can be created for each workflow rule.

Webhooks

Webhooks helps Zakya communicate with the third-party applications by sending instant web notifications every time an event occurs. You can configure HTTP and HTTPS URLs and associate them with workflow rules to automate the notification process. In some cases, this notification can be utilized to initiate an action in another application.

Assume you own a clothing store and regularly collect feedback from your customers about their shopping experiences. This feedback data is collected using a third-party application that is not integrated with Zakya.To fetch and utilize this information in Zakya, you may define a workflow rule with a webhook action. Once established, Zakya can connect with your third-party application and fetch the information according to your requirement.

Learn more about webhooks

A webhook can be created with the following fields:

Field/SectionDescription
NameProvide a unique name for the webhook.
ModuleSelect the module for which you want to create the webhook.
DescriptionA description about the webhook can be added if required.
URL & ParametersSelect any one of the HTTP methods listed below and enter the URL of the third-party application. These
  • Post: Requests that the data sent must be considered as new.
  • Put: Requests that the data sent be considered as a modified version of the one already present.
  • Delete: Requests that the data be deleted.

Note: If you want to specify a port number in the URL and Parameters field, note that Zakya only supports port numbers 80 and 443.

Add ParametersYou can also add additional query parameters by entering the required values in the Key and Value fields. You can add custom parameters like Auth Token, Security Token, API Key, and so on.
Once you have added the value, check the I want to secure this webhook option if you want to secure your webhook. Enter the secret key in the Secret Token field. This will help to verify whether the webhook was sent from Zakya. It should be alphanumeric and range between 12-50 characters.

Note:

  • You cannot edit or view the secret token later.
  • The secret token will be used to compute a hash value. So, you will have to ensure that the same token is available on your server to compute a similar hash value.
HeadersYou can include any additional information that you want to be included in the HTTP request here. Click + Add New Headers if you want to add additional headers.
Authorization typeChoose how you want to authorize the webhook.
  • Self-Authorization: Select this option to set up your webhook by providing the authorization details manually.
  • Connections: Select this option to set up your webhook using a connection. Read our help document on Connections to learn how to create connections.
BodyChoose how you want to send the data. You can choose between
  • Default Payload: In this format, all the parameters associated with the module will be sent to the request body in the application/json format content type.
  • Form-data: n this format, the parameters are encoded as key-value pairs and sent to the server as parts of a multipart message. This format supports text fields and file uploads, making it suitable for sending binary or large data alongside textual parameters.
  • x-www-form-urlencoded: n this format, the data will be encoded and sent to the server.
  • Raw: In this format, you can choose the parameters sent to the request body. The content type will be application/json.

Let us see how to create a webhook

  • Navigate to Settings > Automations > Workflow Actions.
  • Select Webhooks and click +New Webhook.

  • In the + New Webhook page, fill out the required fields and click Save and Execute to check if the webhook works properly, or click Save if you want to execute it later.

Notes:

  • When you set up webhooks, all your contacts’ details in your Zakya organization (name, phone number, address, and email address) will be shared with the URL you want to notify.

Protect Your Webhooks

Securing your webhooks might assist in verifying that they were sent by Zakya. To achieve this, configure your server to listen for Zakya webhooks. When your server receives a webhook from Zakya, it must build a hash value depending on the payload and your secret token. Once completed, check to see if it matches the hash value from Zakya, validating the webhook's source. This can provide an extra layer of security by allowing your server to ignore third-party webhooks that appear to be from Zakya.

Validate webhooks

When your server receives the webhook, a hash value for the payload must be generated in the same way as Zakya did. This is required in order to generate the same hash value and validate the webhook.

The following parameters (if available) are utilized to create the hash value:

  • Query string parameters.
  • The default payload or a modified raw JSON payload.
  • The payload is x-www-form-urlencoded (key-value pairs).

Create a string by ordering the key-value pairs in the payload alphabetically. The pairs must be ordered alphabetically based on their keys.

Notes

  • If your webhook contains query string parameters, ensure that those key-value pairs are sorted along with the payload’s key-value pairs.
  • There cannot be any spaces between the key-value pairs.

Other Actions in Webhooks

Modify Webhooks

You can make changes to the existing webhooks.

  • Navigate to Settings :> Automation > Workflow Actions and select Webhooks.
  • Hover over the webhook and select Edit in the drop-down.

  • Make the required changes and click Save.

Delete Webhooks

  • Navigate to Settings :> Automation > Workflow Actions and select Webhooks.
  • Hover over the webhook and select Delete in the drop-down.

  • In the pop up that appears, click Yes.

  • The webhook will be deleted. If you’ve used the webhook in a workflow rule, ensure that you update the workflow rule as the workflow rule might not get triggered.

Custom Function

Zakya's custom functions allow you to automate your business operations by writing short pieces of code. Whether you're offering a special discount on your customers' invoices or charging a late fee for exceeding their credit period, simply create a code in Deluge script and associate it to a workflow rule, and the process will be automated.

Assume you run a clothing store and as a summer sale, you want to provide 20% discount on MRP for all your garments if they are bought in quantity of three. To achieve this, you can write a Deluge script and associate it with a workflow. So, every time your customer make a purchase that satisfies your condition, the Deluge script will and auto apply the 20% on the MRP of the product.

Deluge

Deluge (Data Enriched Language for the Universal Grid Environment) is an online scripting language integrated with Zoho Creator. It enables you to add logic to the application incrementally, making it more powerful and robust.

Learn more about Deluge

Practice Deluge with code samples

FieldDescription
NameProvide a unique name for the custom function.
ModuleSelect the module for which you want to create the custom function.
DescriptionA description about the custom function can be added if required.
  • Navigate to Settings > Automations > Workflow Actions.
  • Select Custom Functions and click + New Custom Function.

  • On the New Custom Function page, fill out the required details and click Proceed.

  • Enter your deluge script to perform the required action in Zakya and click Save and Execute to check if the custom function works properly, or click Save if you want to execute it later.

Default fields

As of now, custom functions support Users, Organization, Quotes, Invoices, Sales Orders, Purchase Orders, Customers, Bills, and Items modules.

These modules will have the following fields from which you can get the necessary parameters for your custom function.


User

The user field supports the following parameters:

Key FieldsDescription
nameName of the user
zuidZUID of the user

Organization

The organization map supports the following fields:

Key FieldsDescription
organisation_idYour organisation ID
nameOrganisation name
time_zoneTime zone of your organisation
language_codeOrganisation’s language
date_formatYour organisation’s date format
currency_idCurrency ID
currency_codeCurrency code
currency_symbolCurrency symbol
addressOrganisation address
phoneOrganisation’s contact number
faxFax number
websiteOrganisation URL
emailEmail address
portal_namePortal name of your organisation

Invoice

The invoice map supports the following fields:

Key FieldsDescription
due_dateInvoice due date
payment_expected_dateExpected payment date for the invoice
reference_numberReference number of the invoice
customer_idCustomer ID
customer_nameName of the customer who is assigned to the invoice
currency_idCurrency ID
currency_codeCurrency code
currency_symbolCurrency symbol
exchange_rateExchange rate involved in the invoice
discount_amountDiscount amount involved in the invoice
discountDiscount involved in the invoice
shipping_chargeShipping charge entered in the invoice
adjustmentAdjustments
sub_totalSub total of the invoice
tax_totalTotal tax amount in the invoice
totalTotal amount
balanceBalance
price_precisionNumber of Decimal places
billing_addressBilling address of the customer
shipping_addressShipping address of the customer
notesNotes
termsTerms and conditions
custom_fieldsInvoice custom fields
salesperson_idID of the salesperson

Sales Order

Key FieldsDescription
dateSales Order date
tax_totalTotal tax amount in the sales order
zcrm_potential_idID of the potential in Zoho CRM
discount_amountDiscount amount involved in the sales order
salesorder_idSales order ID
discountDiscount
shipment_dateDate on which shipment is made
billing_addressBilling address of the customer
line_itemsLine items
currency_codeCurrency code
totalTotal amount
delivery_method_idDelivery method ID
termsTerms and conditions
delivery_methodMethod of delivery
shipping_addressShipping address of the customer
exchange_rateExchange rate involved in the sales order
currency_symbolCurrency symbol
custom_fieldsSales order custom fields
quote_idQuote ID
reference_numberReference number of the sales order
salesperson_nameName of the salesperson involved
salesperson_idID of the salesperson involved
shipping_chargeShipping charge entered in the sales order
salesorder_numberYour sales order number
sub_totalSub total of the sales order
adjustmentAdjustments made
customer_nameName of the customer who is assigned to the sales order
customer_idID of the customer who is assigned to the sales order
currency_idCurrency ID
statusStatus of your sales order

Purchase Order

The purchase order map supports the following fields:

Key FieldsDescription
owner_idID of associated owner
billing_addressBilling address associated to customer
sourceSource of the customer
contact_idContact ID
payment_termsPayments terms associated to customer
currency_codeCurrency code
language_codeLanguage code
contact_typeType of the contact
twitterTwitter info
shipping_addressShipping address associated to customer
pricebook_idID of pricebook associated
contact_nameName of contact
websiteWebsite of contact
owner_nameName of contact owner
currency_symbolCurrency symbol
custom_fieldsCustom fields associated with customer
facebookFacebook info
pricebook_nameName of pricebook associated
primary_contact_idID of primary contact
company_nameName of the company
contact_salutationContact salutation
currency_idCurrency ID
payment_terms_labelPayment terms label
statusStatus

Bill

The bill map supports the following fields:

Key FieldsDescription
dateDate on the bill
bill_idID of the bill
purchaseorder_idsID of the purchase order involved
tax_totalTotal tax amount in the bill
exchange_rateExchange rate involved in the bill
currency_symbolCurrency symbol
custom_fieldsBill custom fields
due_dateDue date of the bill
vendor_nameName of the vendor involved
billing_addressBilling adress
line_itemsLine items in the bill
payment_termsPayments terms associated to vendor
payment_expected_dateExpected payment date
reference_numberReference number of the bill
currency_codeCurrency code
totalTotal on the bill
bill_numberBill number
payment_madePayment made for the bill
balanceBalance amount
recurring_bill_idID of the recurring bill profile
vendor_idID of the vendor involved
sub_totalSub-total on the bill
statusBill status

Item

The item map supports the following fields:

Key FieldsDescription
item_idItem ID
custom_fieldsItem custom fields
item_typeType of the item
tax_nameName of the tax involved
purchase_ratePurchase rate of the item
tax_idID of the tax involved
unitUnit of the item
account_idSales account ID
purchase_account_nameName of the purchase account
purchase_account_idPurchase account ID
tax_typeType of the tax involved
rateSales rate of the item
account_nameName of the sales account involved
nameName of the item
tax_percentagePercentage of tax involved
pricebook_ratePricebook rate
skuSKU of the item
statusStatus of the item

Learn more about how to use Deluge scripts for writing custom functions

Other Actions in Custom Functions

Modify custom functions

You can make changes to the existing custom functions.

  • Navigate to Settings :> Automation > Workflow Actions and select Custom Functions.
  • Hover over the webhook and select Edit in the drop-down.

  • Make the required changes and click Save.

Delete custom functions

  • Navigate to Settings :> Automation > Workflow Actions and select Custom Functions.
  • Hover over the webhook and select Delete in the drop-down.

  • In the pop-up that appears, click Yes to delete the custom function.

Schedules

Zakya lets you create and run predefined tasks at the specified time intervals using schedules. You can create your tasks using a Deluge script and schedule this task to be executed at a particular time or on a recurring basis.

Assume you are running a clothing store, where you set a monthly sales target for your salesperson. Every month, you want to send Sales by Salesperson report and a congratulatory email when they have achieved their target or a motivating email for them to perform better. To achieve this, you can write a function and schedule it to be sent to your sales person every month.

FieldsDescription
NameProvide a unique that represents the schedule type.
FrequencyFrequency and recurrence pattern for the schedule to be executed. This can be hourly, daily, weekly, monthly, or yearly.

Hourly: The task will be executed every hour of the day (or based on your recurrence pattern).

Daily: The task will be executed every day (or based on your recurrence pattern). You can choose to exclude the weekends.

Weekly: The task will be executed once a week. Select the day of the week on which the task should be executed.

Monthly: The task will be executed once a month. This can be a specific date or a day in a month.

Yearly: The task will be executed once a year. You can select the month and specify the date of execution or specify the day.

Execute task on

Weekly: For example, you can select Monday and Tuesday, and the task will run on those days each week.

Monthly: For example, you can set it to run on the 5th of every month or on the second Saturday of the month.

Yearly: For example, the task can be scheduled for the first Sunday in January or specifically on January 5.

Start Date and TimeWhen the schedule should start. For example, you can set your hourly schedule to start on 28th February, 2025, at 00:06 AM.
Expires afterWhen the schedule should expire. It can expire after many executions or on a set date or not expire at all.

Create your Schedule

  • Navigate to Settings > Automation > Schedules and click +New Schedule

  • In the New Schedule page, fill out the required fields and create a Deluge script for your required action.

  • Click Save, or Save and Execute to run it.

Notes

  • The start date of a schedule cannot be more than one year from the creation date.
  • You can create a maximum of 10 custom schedules.

Actions on Schedule

Modify your schedule

You can make changes to the existing schedule.

  • Navigate to Settings > Automation > Schedules.
  • Hover over the schedule amd select Edit in the drop-down.

  • Make the required changes to the schedule and click Save.

Inactive your schedule

  • Navigate to Settings > Automation > Schedules.
  • Hover over the schedule amd select Mark as Inactive in the drop-down.

Delete your schedule

  • Navigate to Settings > Automation > Schedules.
  • Hover over the schedule amd select Delete in the drop-down.

  • In the pop-up that appears, click Yes to delete the schedule.

Last modified ago