
Integration features easla.com
No modern electronic document management system is unthinkable without the possibility of integrating it into the existing information space of the organization using the API or communication protocols. Easla.com is

no exception .
First of all, easla.com allows employees to log in in several ways. The first, of course, is authorization using your easla.com account . Second, authorization using social networks. And third, authorization using the organization’s domain . Yes, yes, the online system allows you to log in through the domain! I'm not kidding.
Obviously, for authorization through the organization’s domain, the administrator must configure accordingly in easla.comand in the domain itself. In the domain it is recommended to create additional. a user who has a limited set of rights sufficient to read user data and more. Open a port or tunnel to a domain. The domain administrator must decide for himself which is easier, more convenient and safer.
On the easla.com side, you must specify the domain IP, username and password, as well as the path to access users. Check the connection and, if successful, import users from the domain. If users are already created, then you can not import, although import simplifies the life of the administrator by an order of magnitude.

By the way, when importing users, not only the last name, first name, middle name, login and email are imported. mail, but also all the necessary attributes, as well as the position and department.

Import from LDAP visually displays previously imported users, their status (blocked or not). In addition, it contains a hyperlink to an existing account at easla.com . In the case when a lot of changes have been made on the domain side, say, there has been a "mass migration" of users from one account to another and their phone numbers and cabinet numbers have changed, you can update the data in the system with one button "Update all imported users".
All taking care of the administrator!
Of course, easla.com has its own mail server, but letters sent using it will be on behalf of the same virtual user. But most employees are accustomed or accustomed to answering incoming messages without looking at the sender's address and despite the warning that this is unnecessary. As a result, the letters go nowhere.
You can teach users to properly perceive mail messages from the system, but you can do otherwise - use the organization's mail server. Configuring easla.com allows you to specify the organization's mail server name, port, username and password. After that, if the from parameter is filled in the sendEmail function , the message will leave the organization’s mail server, and if the from parameter isnot specified, then from the easla.com mail server .

The easla.com system provides all registered administrators and users access to data via the SOAP protocol . The description of the functions can be found on the links (only for authorized users and administrators):
https://easla.com/en/admin/soap
https://easla.com/en/user/soap
Of course, access to data for the administrator and user - different. A user, even through SOAP, will not be able to access an object to which he does not have access rights, and the administrator has the authority to receive data about all objects.
You can use SOAP in a variety of ways. For example, using a script in VBScript:
Using EaslaAgent installed on the user's workplace, you can write modules and stand-alone applications in C # - now a very popular programming language. The agent will authorize the user, which simplifies the life of the programmer. The agent also converts all calls to easla.com to the correct requests.
By the way, the agent provides the ability to display a dialog box with a list of received objects so as not to “fence” it in each application again and again. The window looks something like this:

A snippet of code that receives a list of objects from easla.com and displays them in a dialog box:
Finally, I add that easla.com can integrate into MS SQL using the CLR module. By installing Easla.com module for MS SQL , you can directly query data from easla.com directly from an SQL query , process and transmit it, say, to locally used systems or to reports.
A simple example:
Summarizing, I repeat, only a truly open system has the right to live in the current conditions and easla.com allows the user (in this case, rather, the administrator) to feel the full flexibility of its operation and independence when accessing data. No limits!

no exception .
User Authorization and Import
First of all, easla.com allows employees to log in in several ways. The first, of course, is authorization using your easla.com account . Second, authorization using social networks. And third, authorization using the organization’s domain . Yes, yes, the online system allows you to log in through the domain! I'm not kidding.
Obviously, for authorization through the organization’s domain, the administrator must configure accordingly in easla.comand in the domain itself. In the domain it is recommended to create additional. a user who has a limited set of rights sufficient to read user data and more. Open a port or tunnel to a domain. The domain administrator must decide for himself which is easier, more convenient and safer.
On the easla.com side, you must specify the domain IP, username and password, as well as the path to access users. Check the connection and, if successful, import users from the domain. If users are already created, then you can not import, although import simplifies the life of the administrator by an order of magnitude.

By the way, when importing users, not only the last name, first name, middle name, login and email are imported. mail, but also all the necessary attributes, as well as the position and department.

Import from LDAP visually displays previously imported users, their status (blocked or not). In addition, it contains a hyperlink to an existing account at easla.com . In the case when a lot of changes have been made on the domain side, say, there has been a "mass migration" of users from one account to another and their phone numbers and cabinet numbers have changed, you can update the data in the system with one button "Update all imported users".
All taking care of the administrator!
Mail server
Of course, easla.com has its own mail server, but letters sent using it will be on behalf of the same virtual user. But most employees are accustomed or accustomed to answering incoming messages without looking at the sender's address and despite the warning that this is unnecessary. As a result, the letters go nowhere.
You can teach users to properly perceive mail messages from the system, but you can do otherwise - use the organization's mail server. Configuring easla.com allows you to specify the organization's mail server name, port, username and password. After that, if the from parameter is filled in the sendEmail function , the message will leave the organization’s mail server, and if the from parameter isnot specified, then from the easla.com mail server .

SOAP
The easla.com system provides all registered administrators and users access to data via the SOAP protocol . The description of the functions can be found on the links (only for authorized users and administrators):
https://easla.com/en/admin/soap
https://easla.com/en/user/soap
Of course, access to data for the administrator and user - different. A user, even through SOAP, will not be able to access an object to which he does not have access rights, and the administrator has the authority to receive data about all objects.
You can use SOAP in a variety of ways. For example, using a script in VBScript:
Retrieving a list of outgoing emails from easla.com
Function EaslaSoapLogin(userName, password)
Dim strSoap
strSoap = "" & Chr(13) & _
"" & Chr(13) & _
"" & Chr(13) & _
"" & userName & " " & Chr(13) & _
"" & password & " " & Chr(13) & _
" " & Chr(13) & _
" " & Chr(13) & _
" "
EaslaSoapLogin = strSoap
End function
Function EaslaSoapLogout()
Dim strSoap
strSoap = "" & Chr(13) & _
"" & Chr(13) & _
"" & Chr(13) & _
" " & Chr(13) & _
" "
EaslaSoapLogout = strSoap
End function
Function EaslaSoapOutgoings()
Dim strSoap
strSoap = "" & Chr(13) & _
"" & Chr(13) & _
"" & Chr(13) & _
"" & Chr(13) & _
"" & Chr(13) & _
"234 " & Chr(13) & _
"118 " & Chr(13) & _
" " & Chr(13) & _
"" & Chr(13) & _
"- crs_management_outgoing_regnum
" & Chr(13) & _
"- crs_management_outgoing_document
" & Chr(13) & _
"- crs_management_outgoing_attachments
" & Chr(13) & _
" " & Chr(13) & _
"" & Chr(13) & _
"- " & Chr(13) & _
"
status " & Chr(13) & _
"" & Chr(13) & _
"- crs_management_outgoing_created
" & Chr(13) & _
" " & Chr(13) & _
" " & Chr(13) & _
" " & Chr(13) & _
" " & Chr(13) & _
" " & Chr(13) & _
" "
EaslaSoapOutgoings = strSoap
End function
Function EaslaLogin(login, password)
Dim URL
URL = "https://easla.com/ru/user/soap/ws/1"
Dim strSoapReq
strSoapReq = EaslaSoapLogin(login, password)
Dim oHttp
Set oHttp = CreateObject("Msxml2.XMLHTTP")
oHttp.open "POST", URL, false
oHttp.setRequestHeader "Content-Type", "application/soap+xml"
oHttp.setRequestHeader "charset", "utf-8"
oHttp.send strSoapReq
Dim strResult
strResult = oHttp.responseText
'проверка, ошибка или корректный результат?
dim regExp
Set regExp = CreateObject("VBScript.RegExp")
regExp.Multiline = True
regExp.Pattern = "(.*) "
'Wscript.Echo strResult
Set matches = regExp.Execute(strResult)
if matches.count = 0 then
EaslaLogin = false
Exit Function
end if
EaslaLogin = (matches(0).SubMatches(0) = "true")
End Function
Function EaslaLogout
Dim URL
URL = "https://easla.com/ru/user/soap/ws/1"
Dim strSoapReq
strSoapReq = EaslaSoapLogout()
Dim oHttp
Set oHttp = CreateObject("Msxml2.XMLHTTP")
oHttp.open "POST", URL, false
oHttp.setRequestHeader "Content-Type", "application/soap+xml"
oHttp.setRequestHeader "charset", "utf-8"
oHttp.send strSoapReq
Dim strResult
strResult = oHttp.responseText
'проверка, ошибка или корректный результат?
dim regExp
Set regExp = CreateObject("VBScript.RegExp")
regExp.Multiline = True
regExp.Pattern = "(.*) "
'Wscript.Echo strResult
Set matches = regExp.Execute(strResult)
if matches.count = 0 then
EaslaLogout = false
Exit Function
end if
EaslaLogout = (matches(0).SubMatches(0) = "true")
End Function
Function EaslaOutgoings(ByRef ids, ByRef descriptions)
Dim URL
URL = "https://easla.com/ru/user/soap/ws/1"
Dim strSoapReq
strSoapReq = EaslaSoapOutgoings()
Dim oHttp
Set oHttp = CreateObject("Msxml2.XMLHTTP")
oHttp.open "POST", URL, false
oHttp.setRequestHeader "Content-Type", "application/soap+xml"
oHttp.setRequestHeader "charset", "utf-8"
oHttp.send strSoapReq
Dim strResult
strResult = oHttp.responseText
'проверка, ошибка или корректный результат?
dim regExp
Set regExp = CreateObject("VBScript.RegExp")
regExp.Multiline = True
regExp.Pattern = "(.*) "
Set matches = regExp.Execute(strResult)
if matches.count = 1 then
EaslaOutgoings = false
Exit Function
end if
EaslaOutgoings = ParseXMLToOutgoingsArray(Progress, strResult, ids, descriptions)
End function
Sub Reverse( ByRef myArray )
Dim i, j, idxLast, idxHalf, strHolder
idxLast = UBound( myArray )
idxHalf = Int( idxLast / 2 )
For i = 0 To idxHalf
strHolder = myArray( i )
myArray( i ) = myArray( idxLast - i )
myArray( idxLast - i ) = strHolder
Next
End Sub
Function ParseXMLToOutgoingsArray(progress, strXML, ByRef ids, ByRef descriptions)
Dim xmlDoc
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async = false
Dim ret
ret = xmlDoc.loadXML(strXML)
if (xmlDoc.parseError.errorCode <> 0) then
Dim myErr
Set myErr = xmlDoc.parseError
ThisApplication.AddNotify "Ошибка при разборе XML " + myErr.reason
end if
dim nodeList
Set nodeList = xmlDoc.SelectNodes("//getObjectrefsResult/item")
Dim cnt, q, n
cnt = nodeList.length
q = 0
For Each node In nodeList
dim id
'id = id_node.getElementsByTagName("value").item(0).Text
id = node.getElementsByTagName("id").item(0).Text
dim description
description = node.getElementsByTagName("description").item(0).Text
n = UBound(ids)
if (n < 0) Then n = 0
ReDim Preserve ids(n + 1)
ReDim Preserve descriptions(n + 1)
ids(UBound(ids)) = id
descriptions(UBound(descriptions)) = description
q = q + 1
Next
Call Reverse(ids)
Call Reverse(descriptions)
ParseXMLToOutgoingsArray = q
End Function
Dim auth
auth = EaslaLogin("ORGANIZATION_CODE\User_login", "User_password")
if (auth = false) then
MsgBox "Авторизация на easla.com не пройдена. Неверное имя пользователя или пароль!", vbCritical
Exit Sub
end if
Dim ids
Dim descriptions
Dim success
success = EaslaOutgoings(ids, descriptions)
Call EaslaLogout
FROM#
Using EaslaAgent installed on the user's workplace, you can write modules and stand-alone applications in C # - now a very popular programming language. The agent will authorize the user, which simplifies the life of the programmer. The agent also converts all calls to easla.com to the correct requests.
By the way, the agent provides the ability to display a dialog box with a list of received objects so as not to “fence” it in each application again and again. The window looks something like this:

A snippet of code that receives a list of objects from easla.com and displays them in a dialog box:
var result = EaslaApp.getObjectrefs(object_def,
new string[] { "crs_management_incoming_contragent_regnum" },
new Easla.KeyValuesPairSoap[]
{
new Easla.KeyValuesPairSoap() {key = "status", values = new string[] {"crs_management_incoming_created"} },
new Easla.KeyValuesPairSoap() {key = "isdeleted", values = new string[] {"0"} }
});
var m = EaslaApp.ShowSelectObjectDialog(result,
new Easla.KeyValuePairSoap[]
{
new Easla.KeyValuePairSoap() { key = "Описание", value = "description"},
new Easla.KeyValuePairSoap() { key = "Дата создания", value = "createtime"},
new Easla.KeyValuePairSoap() { key = "Статус", value = "status.name"},
new Easla.KeyValuePairSoap() { key = "Регистрационный номер отправителя", value = "attributerefs[0].values[0].values[0]"}
}) as Easla.ObjectrefComplexSoap;
SQL
Finally, I add that easla.com can integrate into MS SQL using the CLR module. By installing Easla.com module for MS SQL , you can directly query data from easla.com directly from an SQL query , process and transmit it, say, to locally used systems or to reports.
A simple example:
select @logined = [master].[dbo].[EASLAlogin](пользователь,пароль)
IF (@logined = 1) BEGIN
-- получение идентификаторов организации, процесса и объекта по их обозначениям
SELECT @organization_id = organization.id, @process_id = process.id, @objectdef_id = objectdef.id
FROM [master].[dbo].[EASLAgetOrganization] ('TNGP') AS organization
LEFT JOIN [master].[dbo].[EASLAgetAllProcesses] () AS process ON process.oid = organization.id
LEFT JOIN [master].[dbo].[EASLAgetAllObjectdefs] () AS objectdef ON objectdef.pid = process.id
WHERE process.code = 'crs_management' AND objectdef.code = 'crs_management_outgoing';
SELECT attributerefs.value('(ArrayOfAttributerefSimpleSoap[1]/AttributerefSimpleSoap[1]/values/item/node())[1]','varchar(30)') as letternum ,attributerefs.value('(ArrayOfAttributerefSimpleSoap[1]/AttributerefSimpleSoap[2]/values/item/node())[1]','varchar(30)') as regdate ,cast(attributerefs.query('(ArrayOfAttributerefSimpleSoap[1]/AttributerefSimpleSoap[3]/values/item/consist/item/revdata)')as varchar(max)) as revguid ,cast([status].query('(StatusSimpleSoap[1]/name[1]/node())')as varchar(max)) as sentstatus
FROM master.[dbo].[EASLAgetobjectrefs]( @process_id, @objectdef_id,CAST(' - crs_management_outgoing_regnum
- crs_management_outgoing_sentdate
- crs_management_outgoing_attachments
' AS XML) ,
' status - crs_management_outgoing_created
',
@user_id –- какой-то пользователь
);
END
IF (@logined = 1) BEGIN
select @logined = 1 - [master].[dbo].[EASLAlogout]()
END
Summary
Summarizing, I repeat, only a truly open system has the right to live in the current conditions and easla.com allows the user (in this case, rather, the administrator) to feel the full flexibility of its operation and independence when accessing data. No limits!