Dynamic Fields being posted by PHP

Moderator: crythias

Locked
mikechekal
Znuny newbie
Posts: 4
Joined: 10 Sep 2015, 17:22
Znuny Version: 4.0.9
Real Name: Mike Chekal
Company: Control Point Corp

Dynamic Fields being posted by PHP

Post by mikechekal »

I am new to the OTRS world and I have been fighting with this issue for a few days. I have looked over the Admin Book and I have not seen what I am looking for. I am looking to use a web form to post information to OTRS using a PHP call. I am using as the base of the PHP call the Simple Web Services Form Processor created by Jeff Eske. What I am looking to do is to post text to a dynamic text field here is a portion of the code that I am using. the real question is how can I check the database to be sure that it is being posted.

Code: Select all

$custfirstname = $_POST[cust_fn];
$TicketID = $client->__soapCall(
	"Dispatch", array($username, $password,
	"TicketObject", "TicketCreate", 
	"Title",        $title, 
	"TypeID",	$typeID, 
	"Queue",   $queue, 
	"LockID",  1, 
	"PriorityID",   $priorityID, 
	"State",        "new", 
	"CustomerUser", $from, 
	"OwnerID",      $ownerID, 
	"UserID",       1,
	"DynamicField_custfirstname", $custfirstname,
	)
);

Second and related question what in the syntax to have this information displayed in a autoreply template I am using

Code: Select all

First Name: <OTRS_TICKET_DynamicField_custfirstname>
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Dynamic Fields being posted by PHP

Post by root »

Maybe by do a TicketGet call?
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
alexus
Znuny wizard
Posts: 383
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Dynamic Fields being posted by PHP

Post by alexus »

Hi,
If you need to put the Customer attributes in Dinamic fields just use event based standard feature
otrs/index.pl?Action=AdminSysConfig;Subaction=Edit;SysConfigSubGroup=Core%3A%3ATicket;SysConfigGroup=Ticket
DynamicFieldFromCustomerUser::Mapping - this is mapping
Ticket::EventModulePost###930-DynamicFieldFromCustomerUser - activate this!
Be water my friend :) !
Alexey Yusov

Production: OTRS CE ITSM 6.0.28 on CentOS 7 + Apache 2.4 + MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
mikechekal
Znuny newbie
Posts: 4
Joined: 10 Sep 2015, 17:22
Znuny Version: 4.0.9
Real Name: Mike Chekal
Company: Control Point Corp

Re: Dynamic Fields being posted by PHP

Post by mikechekal »

Alexus, I might be confused or it might be the way I am doing this. It is my understanding that mapping is from defined fields to dynamic fields(one way), I am looking to go the other way. I am looking to take text entered into a field on a web form and post it to the Ticket database, if I can get the data into the Customer database that is a bonus. If not just getting the data into the Ticket database is fine, so that I can use it later. Let me know if the data can post both ways if so, it will be useful in the future.
mikechekal
Znuny newbie
Posts: 4
Joined: 10 Sep 2015, 17:22
Znuny Version: 4.0.9
Real Name: Mike Chekal
Company: Control Point Corp

Re: Dynamic Fields being posted by PHP

Post by mikechekal »

As an update I have checked the Database and the content is not being posted to the Dynamic Field table in question as there is not any values in Dynamic Field Value table. Do I need to define to change anything in the Create Ticket Script to accept the post.
Locked