Create CustomerUSer in OTRS from PHP via RPC

English! place to talk about development, programming and coding
Post Reply
webnetin
Znuny newbie
Posts: 1
Joined: 07 Oct 2011, 12:04
Znuny Version: 3.0

Create CustomerUSer in OTRS from PHP via RPC

Post by webnetin »

Hi,

Can someone support me what all are the methods available, and how do I get the Customer_user_id value back. Please also help me to understand how to handle password (pw).

I am a newbee for OTRS Soap. Any reference detail if available will be much appreciable.

Regards
DS
jmkdev
Znuny newbie
Posts: 23
Joined: 16 Jan 2013, 08:21
Znuny Version: OTRS 3.1
Real Name: Jignesh
Company: Cisco

Re: Create CustomerUSer in OTRS from PHP via RPC

Post by jmkdev »

1. u need to enable soap to use rpc.pl
steps are
1. login to ur OTRS deployment
2. Go to Admin -> SysConfig
3. Select Framework and then Core::SOAP
4. put username and password

Now you should be able to hit otrs/rpc.pl

You can refer to https://github.com/gtudan/OTRS-Client upto some extent

Sample request to create User is
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodin ... ><Dispatch xmlns="/Core"><Username xsi:type="xsd:string">some_user</Username><Password xsi:type="xsd:string">some_pass</Password><Object xsi:type="xsd:string">CustomerUserObject</Object><Method xsi:type="xsd:string">CustomerUserAdd</Method><Param0_Name xsi:type="xsd:string">Source</Param0_Name><Param0_Value xsi:type="xsd:string">CustomerUser</Param0_Value><Param1_Name xsi:type="xsd:string">UserLogin</Param1_Name><Param1_Value xsi:type="xsd:string">SampleLogin</Param1_Value><Param2_Name xsi:type="xsd:string">UserFirstname</Param2_Name><Param2_Value xsi:type="xsd:string">Sample First Name</Param2_Value><Param3_Name xsi:type="xsd:string">ValidID</Param3_Name><Param3_Value xsi:type="xsd:integer">1</Param3_Value><Param4_Name xsi:type="xsd:string">UserCustomerID</Param4_Name><Param4_Value xsi:type="xsd:integer">1118</Param4_Value><Param5_Name xsi:type="xsd:string">UserID</Param5_Name><Param5_Value xsi:type="xsd:integer">1</Param5_Value><Param6_Name xsi:type="xsd:string">UserEmail</Param6_Name><Param6_Value xsi:type="xsd:string">validemail@vamidDomain.com</Param6_Value><Param7_Name xsi:type="xsd:string">UserPassword</Param7_Name><Param7_Value xsi:type="xsd:string">SamplePass</Param7_Value><Param8_Name xsi:type="xsd:string">UserLastname</Param8_Name><Param8_Value xsi:type="xsd:string">Sample Last Name</Param8_Value></Dispatch></SOAP-ENV:Body></SOAP-ENV:Envelope>
Post Reply