---
title: "EN_Dokumentation WebAgent CRM Integration"
canonical: "https://help.telegra.de/space/TAK/9561593220948/EN_Dokumentation%20WebAgent%20CRM%20Integration"
format: markdown
---
# JSON Service Project  


#### English version below

Dieser Service liest Daten von einem Webservice und rendert diese in eine Tabelle. Der ACD WebAgent ruft den JSON Service je nach dem konfigurierten Agenten-Status und der Berechtigung in der ACD CRM Konfiguration auf. Der JSON Service schickt eine HTML-Seite als Antwort zurück, welche im WebAgent bei Anrufannahme dem Agenten angezeigt wird.

### Features

```
GeneralRendererController:
```

Der hier beschriebene JSON Service ruft eine Kunden-URL auf und kriegt ein JSON Object zurück. Das JSON Object wird in eine HTML-Tabelle formatiert und an den WebAgent (als HTML-Seite) geschickt. Hinweis: Wenn das JSON Object https-Adressen beinhaltet, werden diese automatisch als Link in der Tabelle angezeigt. Der Link ist somit für den Agenten klickbar.

In sonstigen Fällen wird der Inhalt des JSON Objects als Text (Key Value) angezeigt. Beinhaltet das JSON Object den Parameter „openLink: true“, wird der im JSON Object enthaltene Link unmittelbar nach der Anzeige im WebAgent automatisch als neuer Tab im Browser geöffnet.

```
LinkRendererController:
```

Der JSON Service liest die enthaltenen URLs aus den Property-Dateien und schickt eine HTML-Seite an den WebAgent.

Hinweis: In diesem Fall wird die enthaltene URL nicht automatisch aufgerufen. Der Agent muss den im CRM-Fenster angezeigten Link manuell ansteuern. Beinhaltet das JSON Object den Parameter „openLink: true“ als Property, wird der im JSON Object enthaltene Link unmittelbar nach der Anzeige im WebAgent automatisch als neuer Tab im Browser geöffnet.

```
CRM Einrichtung
```

Beispiel:


```
Rest Method: PUT
URL: https://acdx.telegra.de/restacd/crm/configuration
Header: 
admin: xxxxx 
password: xxxxx 
content-type: Application/json
Body:
{
„id“: 0,
„url“: „http://maxmustermann.de“,
„token“: „1234567“,
„status“: „???“ // ALERTING/CONNECTED/OUTALERTING/OUTCONNECT
„parameters“: [
„callid“,
„hotline_id“,
„hotline_name“,
„mode“,
„calling_number“,
„called_number“,
„mandator_id“,
„mandator_name“,
„agent_id“,
„agent_user“,
„call_waiting_time“,
"x_transaction_id"
],
"assignment": [
  {
  "serviceType": "CALLCENTER",
  "serviceId": 1
  }
]

}
```

Hinweis: Kunden können die folgenden Informationen konfigurieren und diese als RequestParameter (kundenURL?callid=1234&calling_number=0123456789) versenden.

– „callid“ // callid  
– „hotline_id“ // Hotline ID  
– „hotline_name“ // Hotline name  
– „mode“ // INBOUND / OUTBOUND  
– „calling_number“ // Anrufernummer  
– „called_number“ // Angerufene Nummer  
– „mandator_id“, // Mandator ID  
– „mandator_name“ // Mandatorname  
– „agent_id“ // Agent ID – Intern  
– „agent_user“ // Sechsstellige Loginnummer des Agenten  
– „call_waiting_time“ // Anzahl Sekunden, die der Anruf in der Warteschleife gewartet hat. Nur für eingehende Anrufe (INBOUND) relevant.  
– „x_transaction_id“ // Globale ID eines Anrufs, bleibt eindeutig auch wenn der Anruf über verschiedene Systeme geht

Im “assignment” kann man die Konfiguration auf einzelne Mandanten oder Callcenter begrenzen. Der ServiceType muss dann MANDATOR oder CALLCENTER lauten. Bleibt die Liste leer, gilt der Request für alle Mandanten / Callcenter. 


```
Update einer CRM Konfiguration
```

Um eine bestehende CRM Konfiguration zu ändern, geht man wie folgt vor:

Zuerst holt man sich per Rest-Request die aktuelle Konfiguration:

```
Rest Method: GET 
URL: https://acdx.telegra.de/restacd/crm/configuration
Header: 
admin: xxxxx 
password: xxxxx 
```

Dies liefert die JSON-Konfiguration die momentan aktiv ist. Möglicherweise gibt es mehrere Einträge für verschieden Agentenstatus.

Den passenden Eintrag raussuchen und in einen folgenden POST request kopieren mitsamt der durchzuführenden Änderungen:

```
Rest Method: POST 
URL: https://acdx.telegra.de/restacd/crm/configuration
Header: 
admin: xxxxx 
password: xxxxx 
content-type: Application/json
Body:
<kopierter JSON Body mit Anpassungen>
```

Anschließend ist die neue Konfiguration aktiv. Agenten verwenden die neue Konfiguration erst nach dem nächsten Login, bei eingeloggten Agenten hat es also direkt keine Auswirkung.

## JSON Service Project

#### English version

This project reads data from a web service and renders it into a table. The ACD WebAgent calls the JSON service depending on the configured agent status and permissions in the ACD CRM configuration. The JSON service returns an HTML page as response.

### Features

```
GeneralRendererController:
```

The JSON service calls the customer URL and gets a JSON object back. The JSON object is formatted into an HTML table and sent to the WebAgent (as an HTML page). Note: If the JSON object contains https addresses, they are automatically displayed as a link in the table. The link is thus clickable by the agent.

In other cases, the content of the JSON Onject is displayed as text (Key Value). If the JSON object contains the parameter „openLink: true“, the link contained in the JSON object is automatically opened as a new tab in the browser immediately after it is displayed in the WebAgent.

```
LinkRendererController:
```

The JSON service reads the contained URLs from the property files and sends an HTML page to the WebAgent.

Note: In this case the contained URL is not called automatically. The agent must manually navigate to the link displayed in the CRM window. If the JSON object contains the parameter „openLink: true“ as a property, the link contained in the JSON Object is automatically opened as a new tab in the browser immediately after it is displayed in the WebAgent.

```
CRM Setup
```

Example: See above

**Note**: The customer can configure the following information and send it as a request parameter (customersURL?callid=1234&calling_number=0123456789)- „callid“ // callid

– „hotline_id“ // Hotline ID  
– „hotline_name“ // Hotline name  
– „mode“ // INBOUND / OUTBOUND  
– „calling_number“ // Calling number  
– „called_number“ // Called number  
– „mandator_id“, // Mandator ID  
– „mandator_name“ // Mandator name  
– „agent_id“ // Agent ID – Intern  
– „agent_user“ // Six-digit login number of the agent  
– „call_waiting_time“ // Seconds, how long the call has been waiting in a waiting queue. Only relevant for incoming calls (INBOUND).  
– „x_transaction_id“ // unique identifier of the call, also unique when the call goes over multiple systems

```
Update CRM configuration
```

To update an existing CRM configuration follow these steps:

First get the current configurations via Rest:

```
Rest Method: GET 
URL: https://acdx.telegra.de/restacd/crm/configuration
Header: 
admin: xxxxx 
password: xxxxx 
```

As response you will get all current active CRM configurations in JSON format. There might be multiple entries for different agent states.

Pick the entry you want to change, copy the JSON content into a new POST request and do the required changes on the JSON:

```
Rest Method: POST 
URL: https://acdx.telegra.de/restacd/crm/configuration
Header: 
admin: xxxxx 
password: xxxxx 
content-type: Application/json
Body:
<kopierter JSON Body mit Anpassungen>
```

Now the changed configuration is active. Please note, that the changes will only take effect after the next login of an agent. Logged in agents will still use the old configuration.