Application / Workflows

Rules Engine Events

This article describes the available Rules Engine Events. 

There are several types of event which are related to given objects in YayPay for which the selected event is triggered for.

if an event is generated on the customer level, then this is a Customer-type event. Similarly, there are Invoice type events that are triggered by invoices etc.

 
Event Type Objects Action can access
Credit Application none
Customer Customer
Invoice

Invoice

Customer

Payment

Payment

Customer

Sales Order Customer
Credit Memo Customer

It follows that, each type of event has is own set of possible actions which can be performed.

Example  

If the event is a customer-type event (like "Daily/Weekly/Monthly time trigger"), it won't be able to use Invoice-level billing contacts or use invoice-specific actions.

Delete

Note

When configuring a specific action, only the relevant fields and options are available.



Credit Application - Credit Application received

This event is triggered when a business receives a credit application form from a customer.

Based on the rule's settings, a chosen action is executed. The most typical use cases are sending an email reminder, creating a task, or scheduling a call.

Subsequently, you can view and manage the newly created tasks on the Tasks page and send email reminders on the Communications page.

Delete

Note

When configuring a specific action, only the relevant fields and options are available.

To be able to use this feature, navigate to Settings | Business and make sure that you have the Enable Online Credit Application check-box checked.

This is available for Advanced Credit users only. To obtain access to this feature, contact your YayPay account manager.


Credit Memo - X days after credit memo is created

If you want the action (e.g. sending a reminder ) to be triggered in X days after the credit memo was issued. 

Note: If CreditMemo Amount = Applied amount, the event will not be triggered.


Customer - Customer is created

Select Customer is created from EVENT to trigger a selected action when a new customer is synced or created in YayPay for the first time.


Delete

Note

This does not apply to customers that already exist in YayPay.



Customer - Auto and Recurring payments 

This event allows us to set up AutoPayment creation, removing or updating as a trigger. The action can be done both for the Statement page and Customer Portal, e. g.: if you want to track when a customer makes some changes, you can set a reminder to an AR Rep or any other action.

Customer - Balance is approaching credit limit

This event triggers If on customer update balance changes and becomes (but wasn’t before) > 90% of credit limit event is triggered.

Customer - Credit Card Expiration Notice

The rule with this setting as an event allows to send a reminder or create a task (or any other action) when a customer has a saved credit card on file that will expire soon. 

Customer - Credit Score has changed by X points

This event triggers if the customer's credit score has increased/decreased by the set number of points. The rule will not trigger if the old credit score was N/A.  

The credit score can be changed manually on the customer's Statement page, or by editing the customer's Scorecard. It is also recalculated automatically every 1st day of the month, or when the Advances Credit module was disabled and then enabled again.

Delete

Note

This functionality is available for Advanced Credit users only. To obtain access to this feature, contact your YayPay account manager.


Customer - Customer balance exceeds/is less than X

This event is triggered when a customer's balance exceeds/goes under a certain threshold.

The balance is checked when the customer is synced from ERP and the balance changes.

It can be used in the following use cases:

  • To notify customers through an email reminder when their balance exceeds a certain limit.

  • To notify an internal team or create a task to take action on this customer, e.g. review their credit limit.

  • To enable or disable customers' payment methods. For example, you may only want customers with a balance under $10K to pay with a credit card.


Delete

Note

This rule uses the customer balance taken from the ERP. 

However, if the Use calculated Customer balance is checked in Settings | Business, this rule will not work. This is because this setting ignores the balance taken from the ERP system.


Customer - custom field changed

This option allows triggering an action by a value change in a customer custom filed. 

The action will be executed for all custom fields (including new ones, which were absent before). In this case, it is important to follow these steps in the given order:

1) set up a custom field

2) sync the custom field

3) create a rule with the "Customer custom field changed" event.

For existing custom fields - is triggered when their value is updated/changed (empty =>value, value1=>value2) 

Some example use cases: sending a reminder to a customer which custom field value changes; creating a task for an AR when the custom status(value in their custom field) is changed. 

If you want a particular value to trigger the action, add a custom condition with this custom field, operator = equals, and enter the value you expect to receive. 

Customer delayed event

An option to delay action for any period of time. This trigger requires creating 2 events in a particular sequence. 

Event #1. Create a Customer delayed event with the expected action: 

Event #2. Create an event with the expected event(trigger) and choose the action Call customer delayed event:
*Event: a dropdown where you can choose priorly created events. 

*Delay: a period of delay since the event should be triggered. 

 

Use case#1: (example from the screenshots above) A customer exceeds 10 000 of their balance, we want to send them a reminder not immediately, but in 3 days. 

Use case#2: An event is meant to check a custom field value (can be set up with custom conditions while creating an event #1), and if the value does/does not equal a particular value, then execute the action.

Customer - Daily/Weekly/Monthly time trigger

With this event, you can schedule and trigger recurring events at set intervals.

For example, you can configure the event to send email or mail reminders, or monthly statements to customers. This event is triggered based on the configured time interval. The settings in the Workflow settings dialog or Global rules dialog such as the option Do not send reminder if ERP PDF is missing do not have any impact on this event.


If you select a Monthly Cadence, you can also choose a Specific date for triggering the rule:


  • Additionally, if you select Every 'x' days, you can also specify Number of days and Time when the rule will be triggered. For example, you can run credit checks every 5 days.

    To send separate email reminders to individual invoice billing contacts at specified intervals with content that is relevant to them, select the Send an email reminder action and choose the Invoice billing contact option from the Recipient dropdown menu. This will trigger sending of email reminders at set intervals with content that is relevant to the respective invoice billing contacts.

If these reminders contain dynamic tags or attachments, the following applies:
  • If these reminders contain the following customer-level dynamic tags, they will display only the relevant invoice billing contacts data when sent:
    • Customer Open Invoices Table – the tag will display invoices that belong to the given invoice billing contact and are within a specified time period.

    • Open Documents Table – the tag will display invoices that belong to the given invoice billing contact, within a specified time period and will include all other open documents of a customer.

    • Billing Contact Email/ Billing First Name/Billing Full Name – these tags will display the given invoice billing contact details.

    • Statement Link/ Pay now Link – these tags will display a link that leads to the Customer Portal web page containing invoices that belong to given invoice billing contact.

    • Other dynamic tags remain unaffected.

  • If you include attachments, only attachments selected within the Attach open invoice PDFs option will be filtered based on the invoice billing contact.
Delete

Note

When dynamic tags like Billing Contact Email/ Billing First Name/Billing Full Name, Statement Link and Pay now Link are used within a table tag, they will work at a customer-wide level. However, when you use these tags separately within the email, they will display content specific to the individual invoice billing contacts.


Example

A customer wants to send monthly email reminders to the recipients assigned the Invoice Billing Contact (IBC) role. These reminders should provide regular updates containing data relevant only to the given IBCs.

To achieve this, the customer creates a rule using the Daily/Weekly/Monthly time trigger event, sets its cadence to Monthly and specifies the trigger's date and time. Subsequently, the customer selects the Send an email reminder action and chooses its recipients from the Recipient dropdown menu. Following this, the customer selects a template from the list and saves the rule.

The customer has five invoices, assigned as follows:

  • Invoice 1 and Invoice 2 are assigned to the invoice billing contact (IBC), Katie.

  • Invoice 3 and Invoice 4 are assigned to the invoice billing contact, Dan.

  • Invoice 5 does not have an assigned invoice billing contact.

  • The customer billing contact (CBC) for all these invoices is Jack.

Based on the rules configuration, the email reminders will be sent to the following recipients:

  • Case 1: Only the Invoice Billing Contact role is selected as the recipient.

    As a result, two emails will be sent:
    • One email with invoices 1 and 2 to IBC Katie.

    • One email with invoices 3 and 4 to IBC Dan.

    • Since no IBC is assigned for invoice 5, no email will be sent for this invoice.


  • Case 2: Both the Invoice Billing Contact and the Customer Billing Contact roles are selected as recipients.

    As a result, two emails will be sent:
    • One email with invoices 1 and 2 to IBC Katie and CBC Jack.

    • One email with invoices 3 and 4 to IBC Dan and CBC Jack.

    • Since no IBC is assigned for invoice 5, no email will be sent for this invoice.


Delete

Note

The settings in the Workflow settings dialog or Global rules dialog such as the option Do not send reminder if ERP PDF is missing do not have any impact on this event.

The timezone used for the Time is determined by the Timezone configuration in the Workflow Settings dialog.


Customer - Email is bounced

This event allows reacting to email communication that bounces off the customer's email server, indicating that the email address no longer exists or they have other issues on their Email server. 

The most typical use case for this is to add a task for AR Specialist to take a look at or schedule a call with a customer to update their contact details. 

Another use case is to exclude a customer from workflow to not send them follow-ups until the contact details are updated. 

This event does not have any configuration in it and will be triggered every time that email to a customer fails.

Customer - Payment Score has changed 

The event is a change in a customer's payment score, which can be used to trigger all possible actions. The rule can have two configurations: increase/decrease of the score to any value (if no value is set), or increase/decrease of the score to the defined value (by setting a score in the dropdown).  

Customer - X days after Workflow assignment date

The event allows triggering some action(s) on a set number of dates after a WF is assigned to a customer. 


Customer - Customer is x days past due

This customer level event triggers when a customer's account is past due by a specified number of days that are set in the Number of days field.

For example, you can create an event that triggers sending of email reminders to customers who are 15 days past due.

 Delete

Caution

This event is not triggered for credit memos.

IIf a company is a child of a parent company that has the Parent level collections check box checked on the SETTINGS tab, the days past due is also evaluated across all child companies. After that, the Customer is x days past due event is triggered for the parent company.


Invoice - Dispute is closed

This trigger means that the action will be triggered by a customer closing the dispute which was initiated before in the Customer Portal. 

The most typical use case for this is to Include an Invoice to the workflow or Assign a workflow. 

Invoice - Dispute is open

This one means that the action will be triggered by a customer opening the dispute in the Customer Portal if they have any issues with paying the invoice. 

The most typical use cases for this are sending reminders to customers, creating a task, or Excluding an invoice from the workflow. 

Invoice - Dispute is updated

The chosen action will be triggered by a customer who made any changes or comments to the open dispute. 

Invoice – X days after dispute created

Once the dispute is created, a selected action will be triggered after a specified number of days.

Delete

Note

This functionality is available for Advanced Dispute users only. To obtain access to this feature, contact your YayPay account manager.


Invoice – X days after dispute updated

Once the dispute is updated, a selected action will be triggered after a specified number of days.


Delete

Note

This functionality is available for Advanced Dispute users only. To obtain access to this feature, contact your YayPay account manager.


Invoice custom field changed

This option allows triggering an action by a value change in an invoice custom field. 

The action will be executed for all custom fields (including new ones, which were absent before). In this case, it is important to follow these steps in the given order:

1) set up a custom field.

2) sync the custom field.

3) create a rule with the "Invoice custom field changed" event.

For existing custom fields - is triggered when their value is updated/changed (empty =>value, value1=>value2) 

Invoice delayed event

An option to delay action for any period of time. This trigger requires creating 2 events in a particular sequence. 

Event #1. Create an Invoice delayed event with the expected action: 

Event #2. Create an event with the expected event(trigger) and choose the action Call invoice delayed event:
*Event field: a dropdown where you can choose priorly created events. 

*Delay: a period of delay since the event should be triggered. 

 

Invoice - Invoice is created 

Select Invoice is created from EVENT to trigger a selected action when a new invoice is created in YayPay for the first time.

The most typical actions include sending email reminders, creating tasks, assigning workflows, and assigning an AR Specialist.


Additionally, select a Configuration. The options are based on the comparison between the ERP and YayPay creation dates:

  • After – when the ERP creation date is later than the date the invoice is pulled into YayPay.
  • Before – when the ERP creation date is earlier than the date the invoice is pulled into YayPay.



Delete

Electronic Invoice Delivery

You can find instructions regarding Electronic Invoice Delivery in YayPay in the https://yaypay.helpjuice.com/collection-workflows/electronic-invoice-delivery-in-yaypay article.

Invoice - Invoice is fully paid from ERP

The chosen action will be triggered by the full payment made by a customer. It happens on the condition that the status of an invoice was changed to PAID. 

The most typical use cases for this are to exclude an invoice from a workflow or send an e-mail reminder.

Invoice - Invoice is partially paid from ERP

The event is triggered when an invoice in status PARTIALLY PAID is synced into YayPay. The event is not triggered when the invoice is closed, (even with another partial payment) or the invoice balance has been impacted by Credit Memo, Adjustment, etc. Example of a use case: partial payment synced from ERP into YayPay system, a user can get a notification that invoice status has changed but not closed and follow up on the reason for short pay.

Delete

Note 

Choose Invoice is fully paid from ERP or Invoice is partially paid from ERP in case the event of the invoice status change is essential rather than the fact of payment itself. Otherwise, you might set up a Payment is received event (see below), which is triggered when a successful payment is made via ERP.

If you set up both event types - Invoice is fully paid from ERP (or Invoice is partially paid from ERP) AND Payment is received - they might be triggered simultaneously when the payment impacts the invoice status.

Invoice - Promise to pay is broken

Promise to pay is broken - In case the promise to pay date was exceeded any following action may be triggered: assign/exclude a customer to/from workflow, assign/exclude an invoice to/from a workflow, send a reminder, create a task. 

Invoice - Promise to pay is created

Promise to pay is created when a customer uses the Promise to pay option in the Customer Portal or AR - on the Statement Page or Invoice Page for an invoice, the following events can be set for: assign/exclude a customer to/from a workflow, assign/exclude an invoice to/from a workflow, enable/disable payment methods, send a reminder, create a task, assign AR/Sales/CS. 

Exclude from the workflow is the most common use. 

The action chosen in settings will immediately be triggered by the event created.

Invoice - X days after invoice date 

X days after invoice date - if you want an action to be created X days after the invoice date. 

Invoice date refers to the actual document date of the invoice from the ERP. 

The most popular use cases are sending e-mail reminders and creating a task.

Invoice - X days before/after invoice due date

If you want the action (a reminder or a task ) to be created in X days after/before the Invoice (due date). 

There is an additional configuration to choose: after/before X days applies to the invoice due date. The action will work only if an event has the exact number of days put in the settings (if the invoice is older than the mentioned number of days the action will not be triggered).  

The trigger is connected to the time zone. 

The most common use cases are sending an e-mail reminder and creating a task. 

Payment - Partial Payment made through YayPay

Partial payment made through YayPay - In this case, the trigger is the partial payment made through the YayPay system. 

Payment - Payment is declined

The Payment is declined event is triggered when a payment made through the YayPay system fails for any reason.

As a result, a task can be created, reminders sent, etc.


Delete

Warning

This event is only triggered for payments made within the last 5 days.


Payment - Payment is received

The Payment is received event triggers any chosen action on the condition that payment was made in any other system, not YayPay.

Delete

Warning

This event is triggered only for payments made within the last 5 days.


Sales Order is created

Any available actions of customer scope can be set to be triggered in case a sales order is pulled to the system from ERP.

Can't find what you need?

Contact our support team support@yaypay.com for help.