Customer API
Downloads: 2
Use Cases | Key features | Description of methods | Package installation | Configuration | System requirements | Roadmap
Use Cases
Integrating your OTRS solution with CRM through web services
Key features
Creating and changing a client company through the standard OTRS web service
Description of methods
CustomerUserCreate
curl -X POST -H 'Content-Type: application/json' \
https://otrs_server/otrs/nph-genericinterface.pl/Webservice/CustomerAPI/CustomerUserCreate \
-d '
{
"UserFirstname": "John",
"UserLastname": "Dow",
"UserCustomerID": "Melone Corporation",
"UserLogin": "johndow",
"UserPassword": "customer_password",
"UserEmail": "johndow@melone-corporationn.com",
"UserMobile": "01234445566",
"Source": "Database Backend",
"Auth": {
"Login": "agent_login",
"Password": "agent_password"
}
}
'
Successful answer:
{"Result":"OK","CustomerUserLogin":"johndow"}
CustomerUserUpdate
curl -X POST -H 'Content-Type: application/json' \
https://otrs_server/otrs/nph-genericinterface.pl/Webservice/CustomerAPI/CustomerUserUpdate \
-d '
{
"UserFirstname": "John",
"UserLastname": "Dow",
"UserCustomerID": "Melone Corporation",
"UserLogin": "johndow",
"UserPassword": "customer_password",
"UserEmail": "johndow@melone-corporationn.com",
"UserMobile": "1234567890",
"Source": "Database Backend",
"Auth": {
"Login": "agent_login",
"Password": "agent_password"
}
}
'
Successful answer:
{"Result":"OK","CustomerUserLogin":"johndow"}
CustomerCompanyCreate
curl -X POST -H 'Content-Type: application/json' \
https://otrs_server/otrs/nph-genericinterface.pl/Webservice/CustomerAPI/CustomerCompanyCreate \
-d '
{
"CustomerID": "Melone Corporation",
"CustomerCompanyName": "Melone Corporation",
"CustomerCompanyStreet": "Fairview St Tallahassee",
"CustomerCompanyZIP": "123456",
"CustomerCompanyCity": "Bridgetown",
"CustomerCompanyCountry": "Barbados",
"CustomerCompanyURL": "www.melone-corporationn.com",
"CustomerCompanyComment": "Special company",
"Auth": {
"Login": "agent_login",
"Password": "agent_password"
}
}
'
Successful answer:
{"CustomerID":"Melone Corporation","Result":"OK"}
CustomerCompanyUpdate
curl -X POST -H 'Content-Type: application/json' \
https://otrs_server/otrs/nph-genericinterface.pl/Webservice/CustomerAPI/CustomerCompanyUpdate \
-d '
{
"CustomerID": "Melone Corporation",
"CustomerCompanyName": "Melone Corporation",
"CustomerCompanyStreet": "Fairview St Tallahassee",
"CustomerCompanyZIP": "123456",
"CustomerCompanyCity": "Bridgetown",
"CustomerCompanyCountry": "Barbados",
"CustomerCompanyURL": "www.melone-corporationn.com",
"CustomerCompanyComment": "Special company",
"ValidID": 2,
"Auth": {
"Login": "agent_login",
"Password": "agent_password"
}
}
'
Successful answer:
{"CustomerID":"Melone Corporation","Result":"OK"}
Package installation
Please use the following URL to install the package utilizing the Admin Interface (please note that you need to be in the "admin" group).
http://your-server/otrs/index.pl?Action=AdminPackageManager
The steps for installing the package are described in the official OTRS instructions for the Administrator.
Configuration
System Configuration
RS::CustomerUserCreate::RequiredFields
Required fields for CustomerUserCreate method. Please, check your CustomerMap in Config.pm
RS::CustomerUserUpdate::RequiredFields
Required fields for CustomerUserUpdate method. Please, check your CustomerMap in Config.pm
RS::CustomerUserCreate::AllowUpdateIfExists
Allows to update customer user account if exists by CustomerUserCreate
Web-services configuration
1. Create a new web-service
https://doc.otrs.com/doc/manual/admin/6.0/en/html/genericinterface.html#webservice_gui
2. Add new Operations in dropdown list
3. Create new agent with RW permissions in the group "users"
System requirements
Minimal requirements to hardware for OTRS:
- Processor 3 GHz Xeon or comparable
- RAM 8 GB RAM
- Disk space 256 GB
Software requirements:
- OTRS Community Edition 6.0
Roadmap