Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/Events/EventBusinessRules/ExpenseEstRulesExample.htm

## Examples of Expense Estimate Creation Rules

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Speaker Travel Estimates](#)

The admin wants to create an event rule to automatically calculate an estimated cost to transport a speaker by car:

1. Navigate to the **Event Business Rules** tab.
2. Create an event business rule with an object type of **expense\_estimate\_speaker\_travel\_rule\_\_v**.
3. Populate the following fields:

   | Property | Entered Value |
   | --- | --- |
   | Name | Estimate by Car |
   | expense\_type\_\_v | The corresponding em\_expense\_type\_\_v record |
   | run\_rule\_event\_action\_\_v | A custom button:  estimate\_expenses\_\_c |
   | speaker\_transportation\_method\_\_v | Car |
   | minimum\_travel\_distance\_\_v | 20 |
   | maximum\_travel\_distance\_\_v | 120 |
   | distance\_unit\_type\_\_v | Miles |
4. Select **Save**.

After creating the Event Business Rule, associate the rule to the appropriate Event Types and Country:

1. Select the **New** button from the event rule’s Event Business Rule Configuration related list.
2. Enter the following field values:

   | Field | Entered Value |
   | --- | --- |
   | event\_business\_rule\_\_v | Estimate by Car |
   | event\_type\_\_v | speaker\_program\_\_v |
   | country\_\_v | US |
   | rule\_start\_date\_\_v | January 1, 2020 |
   | rule\_end\_date\_\_v | December 31, 2025 |
   | cost\_\_v | 350.00 |

An event organizer plans a Speaker Program with Clinton Ackerman as the speaker, who lives 60 miles away from the event’s location and will travel to the event via car. This distance is recorded in the speaker\_travel\_distance\_\_v field in Clinton Ackerman’s em\_event\_speaker\_\_v record.

The organizer also selects the speaker\_transportation\_method\_\_v picklist on the em\_event\_speaker\_\_v record. Since the event is a Speaker Program and the travel distance is within the range of the Estimate by Car event rule, the picklist renders with one possible value: Car.

After the event is planned, the event organizer selects the custom Estimate Expenses button from the event. An em\_expense\_estimate\_\_v record is automatically created with the following properties:

| Field | Value |
| --- | --- |
| em\_event\_\_v | References the event |
| estimate\_vod | Uses the following formula to calculate the cost:   ``` estimate_vod = cost__v = 350.00 ``` |
| expense\_type\_\_v | The same expense type referenced from the Estimate Travel rule |
| event\_business\_rule\_\_v | References the Estimate Travel event rule |
| event\_business\_rule\_parameter\_\_v | Car |
| event\_budget\_\_v | References the budget associated with the event |

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)AV Estimates](#)

The admin wants to create an event rule to automatically calculate the estimated cost for renting microphones, projectors, and video cameras:

1. Navigate to the **Event Business Rules** tab.
2. Create three **expense\_estimate\_av\_equipment\_rule\_\_v** type em\_business\_rule\_\_v records with the following fields populated:

   | Field | Microphone Record | Projector Record | Video Camera Record |
   | --- | --- | --- | --- |
   | name\_\_v | Estimate Microphone Expense | Estimate Projector Expense | Estimate Video Camera Expense |
   | av\_equipment\_\_v | Microphones | Projectors | Video Cameras |
   | rate\_type\_\_v | Day | Hour | Event |
   | expense\_type\_\_v | The corresponding em\_expense\_type\_\_v record | The corresponding em\_expense\_type\_\_v record | The corresponding em\_expense\_type\_\_v record |
   | run\_rule\_event\_action\_\_v | A custom button: estimate\_expenses\_\_c | A custom button: estimate\_expenses\_\_c | A custom button: estimate\_expenses\_\_c |
3. Select **Save**.

After creating the Event Business Rule, associate the rule to the appropriate Event Types and Country:

1. Select the **New** button from the event rule’s Event Business Rule Configuration related list.
2. Create three new Event Business Rule Configurations with the following field values:

   | Field | Microphone Record | Projector Record | Video Camera Record |
   | --- | --- | --- | --- |
   | event\_business\_rule\_\_v | Estimate Microphone Expense | Estimate Projector Expense | Estimate Video Camera Expense |
   | cost\_\_v | 100.00 | 20.50 | 300.00 |
   | event\_type\_\_v | congress\_\_v | congress\_\_v | congress\_\_v |
   | country\_\_v | France | France | France |
   | rule\_start\_date\_\_v | January 1, 2020 | January 1, 2020 | January 1, 2020 |
   | rule\_end\_date\_\_v | December 31, 2025 | December 31, 2025 | December 31, 2025 |
   | local\_currency\_\_sys | Euro | Euro | Euro |

An event organizer plans a Congress in France that occurs over the course of two days. When the organizer navigates to the av\_equipment\_\_v multi-select picklist, the following options are available:

* Microphones
* Projectors
* Video Cameras

The event organizer selects all three options, then selects the custom Estimate Expenses button. This creates three em\_expense\_estimate\_\_v records:

| Field | Record One | Record Two | Record Three |
| --- | --- | --- | --- |
| em\_event\_\_v | References the event | References the event | References the event |
| expense\_type\_\_v | The same expense type referenced from the event rule | The same expense type referenced from the event rule | The same expense type referenced from the event rule |
| event\_budget\_\_v | References the budget associated with the event | References the budget associated with the event | References the budget associated with the event |
| estimate\_vod | Uses the following formula to calculate the cost:  `estimate_vod = cost__v * Days of Event`  `estimate_vod = 100.00 * 2 = 200.00` | Uses the following formula to calculate the cost:  `estimate_vod = cost__v * (Event End Time - Event Start Time for the two days)`  `estimate_vod = 20.50 * 16 = 328.00` | Uses the following formula to calculate the cost:  `estimate_vod = cost__v`  `estimate_vod = 300.00` |
| event\_business\_rule\_\_v | Estimate Microphone Expense | Estimate Projector Expense | Estimate Video Camera Expense |
| event\_business\_rule\_parameter\_\_v | Microphones | Projectors | Video Cameras |

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Speaker Lodging Estimates](#)

For example, the Events Admin wants to create an event rule that automatically calculates the expense for lodging an event speaker for two nights.

1. Navigate to the **Event Business Rules** tab.
2. Create an **expense\_estimate\_speaker\_lodging\_rule\_\_v** type em\_business\_rule\_\_v record with the following fields populated:

   | Property | Entered Value |
   | --- | --- |
   | name\_\_v | Speaker Lodging Estimate |
   | expense\_type\_\_v | The corresponding em\_expense\_type\_\_v record |
   | run\_rule\_event\_action\_\_v | A custom button: Estimate\_Expenses\_\_c |
   | rate\_type\_\_v | Day |
   | speaker\_lodging\_type\_\_v | Hotel |
3. Select **Save**.

After creating the Event Business Rule, associate the rule to the appropriate Event Types and Country:

1. Select the **New** button from the event rule’s Event Business Rule Configuration related list.
2. Enter the following field values:

   | Field | Entered Value |
   | --- | --- |
   | event\_business\_rule\_\_v | Speaker Lodging Estimate |
   | event\_type\_\_v | speaker\_program\_\_v |
   | country\_\_v | US |
   | rule\_start\_date\_\_v | January 1, 2020 |
   | rule\_end\_date\_\_v | December 31, 2025 |
   | cost\_\_v | 150.00 |

An event organizer plans a Speaker Program with Clinton Ackerman as the speaker. The event takes place over two days, so the speaker\_lodging\_nights\_\_v field on the em\_event\_speaker\_\_v record associated with Clinton Ackerman automatically populates with a value of two.

The event organizer selects the speaker\_lodging\_type\_\_v picklist on Clinton Ackerman’s em\_event\_speaker\_\_v record. Since the event is a Speaker Program in the US within the timespan of the Speaker Lodging Estimate event rule, the picklist renders with one value: Hotel.

The organizer finishes planning the event, then selects the custom Estimate Expenses button from the event. An em\_expense\_estimate\_\_v record is automatically created with the following properties:

| Field | Value |
| --- | --- |
| em\_event\_\_v | References the event |
| estimate\_vod | Uses the following formula to calculate the cost:   ``` estimate_vod = cost__v * Nights of Event ```  ``` estimate_vod = 150.00 * 2 = 300.00 ``` |
| expense\_type\_\_v | The same expense type referenced from the event rule |
| event\_business\_rule\_\_v | Speaker Lodging Estimate |
| event\_business\_rule\_parameter\_\_v | Hotel |
| event\_budget\_\_v | References the budget associated with the event |

### Related Topics

[Event Business Rules Overview](EventBusinessRules.htm)

[Creating Expense Estimate Creation Rules](ExpenseEstRules.htm)

[Warning Text and Tokens](WarningTextTokens.htm)
