# Expressions Made Easy

### Easy way of writing expressions for webhook from [version 6.9](https://releasenotes.dataloy.com/v/master-release-6.9/)

The user need not know the attribute names in order to use an expression and will have the possibility to select an attribute from the list of attributes on the given objectType in the subscription and can chose the operators from the list of operators.

This is achieved by the use of special characters as listed below-

* using **.** (Dot) in the expression field will list all the sub objects for the given object type. The list of attributes will be filtered based on the characters typed
* $(dollar) will list the operators that can be used
* using old or ,(comma) will enable the use of oldDlpObject in the expression

For example, instead of using this in an expression&#x20;

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code>dlpObject.getInvoicingStatus() != null &#x26;&#x26; dlpObject.getInvoicingStatus().getStatusTypeCode().equals(“RFP”) &#x26;&#x26; (dlpObject.getDocumentType().getDocumentType().equals(“ACP”)
</code></pre></td></tr></tbody></table>

a simple of achieving this would be to use

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code>.invoicingStatus.statusTypeCode = RFP &#x26;&#x26; .documentType.documentType = ACP OR .documentType.documentType = ACP 
</code></pre></td></tr></tbody></table>

<figure><img src="/files/IWHfvLNAn8UpiSterkZ6" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Clk5Bp28nKY0uavnV4ez" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/LmMPJ12l8SFE6QAkkeYC" alt=""><figcaption></figcaption></figure>

The need for the user to create expressions with **null checks for the objects** is also removed and will be taken care by the platform. Expressions will work the same way if the object is checked for null or not. For example both of the below shall work the same.

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code>.invoicingStatus.statusTypeCode = RFP &#x26;&#x26; .documentType.documentType = ACP OR .documentType.documentType = ACP 
.invoicingStatus != null &#x26;&#x26; invoicingStatus.statusTypeCode = RFP &#x26;&#x26; .documentType.documentType = ACP OR .documentType.documentType = ACP 
</code></pre></td></tr></tbody></table>

Refer [Create Expression Webhook Subscription](https://app.gitbook.com/o/-LhoT2vqihl0pYiCeolt/s/jtn0TIgubUNYP5y4N98w/voyage-management-system/step-by-step-guides/webhook-subscriptions/create-webhook-subscription) for more details about creating an expression subscription in vms


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.dataloy.com/api-release-8.12/dataloy-rest-api/webhooks/expressions-made-easy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
