# Backend Opportunities & Leads

# Opportunities

# Opportunities - Create CRM Definition

If you want to create CRM Tasks for the Opportunities, please switch to the Type [Tasks &amp; CRM](https://en.wiki.dedesales.de/books/backend-tasks-crm).

If a query must be completed when closing an Opportunity, it must be created with the ID "CLOSE". This means that an Opportunity can only be Completed if the query is filled out and Completed with (1).

<div drawio-diagram="2029"><img src="https://en.wiki.dedesales.de/uploads/images/gallery/2026-08/vzQLuuZnGkloLpd5-snpnmzwtlzoxncxy-drawing-9-1759908154.png" alt="SNpNMzwtlZoXNCxY-drawing-9-1759908154.png"/></div>

# Opportunities - Evaluation

An evaluation of the opportunities from the last 12 months can be found in the backend under Evaluation - STATISTICS - Opportunities.

The report can be exported.

# Sales Pipeline - Opportunities

Under Sales pipeline → Opportunities you will see a summary of the sales processes (code table "Opportunities Sales process") with the column "Activated E-Mail Templates".

### Activate E-Mail Templates

You select a sales process from the list. In the Assistant, you specify via checkbox which centrally maintained e-mail templates are available for selection in the client in the widget "E-Mail" for opportunities of this sales process.

How to create an e-mail template can be found under [Settings - E-Mail Templates (Opportunities &amp; Leads)](https://wiki.dedesales.de/link/582#bkmrk-page-title).

<details id="bkmrk-release-ab-version-2"> <summary>Release</summary>

##### From version 21

1. New function: Activation of e-mail templates per sales process for the opportunities widget "E-Mail".
 
</details>

# Lead

# Sales Pipeline - Summary

You receive an overview of all definitions in the Summary under the Leads menu. You can export these as Excel.

<div drawio-diagram="2190"><img src="https://en.wiki.dedesales.de/uploads/images/gallery/2026-08/kHD70jiCrzFEXGfJ-jlqqq6l29b9krhpp-drawing-9-1771405831.png" alt="JLQQQ6l29B9KRHPP-drawing-9-1771405831.png"/></div>

1. The name of the Lead
2. All customers or a selected customer list
3. If available, the associated Campaign
4. The validity period of a Lead
5. The status of a Lead (In progress or Released)

# Sales Pipeline - Creating and Editing Leads

To be able to create leads, you must first maintain the lead definition. If you have questions about this, go to the [Tasks &amp; CRM](https://en.wiki.dedesales.de/books/backend-tasks-crm) section.

You create leads under Sales Pipeline - Leads with the green + "Create a new lead definition".

<div drawio-diagram="2030"><img src="https://en.wiki.dedesales.de/uploads/images/gallery/2026-08/2qtUb4WcS8oQkRx9-km2bqhbsr93xuw3b-drawing-9-1759908877.png" alt="kM2BQHBSr93xUW3b-drawing-9-1759908877.png"/></div>

1. Choose a meaningful Name
2. Specify the validity period
3. Assign the previously selected [Customer list](https://en.wiki.dedesales.de/books/backend-order-quotation-and-complaint-entry/page/customer-lists)
4. Assign the previously created [CRM Configuration](https://en.wiki.dedesales.de/books/backend-tasks-crm)
5. If a Campaign is to be linked, assign the [Campaign](https://en.wiki.dedesales.de/books/backend-order-quotation-and-complaint-entry/page/campaigns) here
6. Set the [Status ](https://wiki.dedesales.de/link/331#bkmrk-4.-status%3A)
 

##### Edit Lead Definitions afterwards

To do this, click on an existing definition and you can change the pre-filled fields. However, note that this could distort the evaluations.

##### Email Templates

In the Assistant step "Email Templates" you select via checkbox which centrally maintained email templates (see [Settings - Email Templates (Opportunities &amp; Leads)](https://wiki.dedesales.de/link/582#bkmrk-page-title)) are available in the client for this lead definition. Only activated templates are selectable in the "Email" widget in the client. From version 21 onwards.

# Sales Pipeline - Costs

Enter the costs for the leads in order to be able to evaluate them statistically.

<div drawio-diagram="2188"><img src="https://en.wiki.dedesales.de/uploads/images/drawio/2026-10/U4HfcTgRc9jo1bG8-drawing-9-1793188382.png" alt="5Wdmz0WMaBZCOHoi-drawing-9-1771405142.png"/></div>

1. Enter a Name for the costs.
2. You can enter the generated costs here
3. The Date on which the costs were incurred
4. If desired, enter a suitable Lead Definition
5. Optionally enter a Campaign

# Lead - Evaluation

To evaluate the documented data from the leads, open the Type Sales pipeline - Leads. Select the desired lead definition and switch to the tab CRM Evaluation.

These lists can be exported to Excel as usual.

# Trigger

Triggers can be defined to execute automatic actions in DeDeSales, e.g. calling a website, creating an activity, or sending an email.

<div drawio-diagram="2318"><img src="https://en.wiki.dedesales.de/uploads/images/gallery/2026-09/NBQhkrfOeXjotiQJ-kkyttcmpwflqzfnv-drawing-9-1779790000.png" alt="kkyTtcMPWfLqZfnv-drawing-9-1779790000.png"/></div>

1. Use the green plus to create a new definition
2. Click on an existing trigger to edit it
3. In the summary you can see when the last execution was
4. The quantity shows how often the trigger has been activated
 

##### Basic

<div drawio-diagram="2329"><img src="https://en.wiki.dedesales.de/uploads/images/gallery/2026-09/9qZfQ3hhkqqHSL1K-uiknsmwz2caqsdre-drawing-9-1780899952.png" alt="UiknsMwZ2CAqsDre-drawing-9-1780899952.png"/></div>

1. Set the name of the trigger
2. Set the secret
3. Set the type of the trigger
4. Depending on the type, enter the corresponding URL or the corresponding picture
 

##### Possible actions that can be executed:

- Create activity
- Edit lead
- Send email
 

Here you must fill in the fields according to your wishes.

### How the trigger is activated

A trigger is always activated only once. So if a picture is shown multiple times or a link is clicked multiple times, the action will only be triggered once.

A URL is required to activate the trigger. The URL is composed as follows:

https://{ihre-dedesales-backend-url}/trigger/{guid des triggers}?j={base64 kodierte Json Daten}&amp;h={hash}

#### Your DeDeSales Backend URL

Please take this from the browser when you access the backend. Note that you have a URL for the test and the live system. You must use the URL where you also created the trigger.

#### Guid of the trigger

You can see the guid of the trigger when you open the trigger in the backend.

[![image.png](https://en.wiki.dedesales.de/uploads/images/gallery/2026-09/nG8Ww3aCgVRAzSAr-ktos8lfphud9uapm-image.png)](https://wiki.dedesales.de/uploads/images/gallery/2026-06/KTos8lFPHUD9uApM-image.png)

#### Base64 encoded Json data

So that DeDeSales can correctly process the data when the trigger is called, information must be provided as a Json object.

<div id="bkmrk-%7B-%22contactid%22%3A-%22k100"><code>&#123;</code>  
<code> &#34;contactId&#34;&#58; &#34;K10001&#34;&#44;</code></div><div id="bkmrk-%22customerid%22%3A-%22k1000"><code> &#34;customerId&#34;&#58; &#34;K10002&#34;&#44;</code></div><div id="bkmrk-%22leadid%22%3A-%224234-2342"><code> &#34;leadId&#34;&#58; &#34;4234&#45;234234343&#45;234324&#45;234&#34;&#44;</code></div><div id="bkmrk-%22employeenr%22%3A-%2299990"><code> &#34;employeeNr&#34;&#58; &#34;99990&#34;</code></div><div id="bkmrk-%7D"><code>&#125;</code></div><div id="bkmrk--5"></div>##### contactId

<div id="bkmrk-die-kontaktnummer-de">The contact number of the contact.</div>##### customerId

<div id="bkmrk-die-kundennummer.">The customer number.</div>##### leadId

<div id="bkmrk-die-guid-des-leads.-">The guid of the lead. Only required if you have chosen Edit lead as the action.</div>##### employeeNr

<div id="bkmrk-die-nummer-des-mitar">The number of the employee from the DeDeSales backend under which the action is executed.</div>##### Hash

The hash is there to prevent triggers from being activated by mistake. The hash is an MD5 hash. It is created from the following string {base64 encoded Json data}{secret}

You specify the secret when creating the trigger in the DeDeSales backend.

If the hash does not match the value determined in DeDeSales, an error 500 will be returned when the URL is called.