How send data to OTRS from external service - otrs

I want send email from page "Create New Email Ticket (?Action=AgentTicketEmail)" in OTRS system. But I want do this from external service. I think, i should use OTRS API, but i can not simple example for this task.
How use OTRS API ?

Please read up on using Web Services with OTRS -> http://otrs.github.io/doc/manual/admin/stable/en/html/genericinterface.html#genericinterface-connectors
! Updated Link for Ver. 6:
https://doc.otrs.com/doc/manual/admin/6.0/en/html/genericinterface.html
You'll need the other application to create a ticket via the web service interface, using SOAP or REST.
The linked documentation has examples in Perl and also examples how to create the REST request using curl on the command line.

Related

Adding an email notification to a WSO2 File Transfer Service that uses the file connector

I have created a file transfer service that uses a file connector. I want an email notification to be sent out when files have been transferred to the directories.
I tried using email connectors and gmail connectors but there are no emails coming through. Is there an easier way to do this without using email or gmail connectors?
The service is done on wso2 integration studio and deployed on wso2 micro integrator 7.1.0
You can use the inbuilt mailto transport to achieve this. Please refer to the documentation here[1].
[1] https://ei.docs.wso2.com/en/latest/micro-integrator/setup/transport_configurations/configuring-transports/#configuring-the-mailto-transport

Oracle Apex and Twilio API

I am trying to have my application use Twilio's SMS API to send a text message to a user's phone when they complete a certain action. What is the general process for doing this in Oracle Apex?
These are just two of a few posts out there on sending SMS from the database.
https://www.jmjcloud.com/blog/sms-messaging-from-oracle-erp-with-ords-and-twillio
https://jeffkemponoracle.com/2016/08/send-sms-mms-and-voice-messages-from-oracle-plsql/
It usually requires something along the lines of
signing up for service
installing a PL/SQL package
enabling database ACL for the relevant host
invoking some PL/SQL to send the SMS

Where to Find Web Service of Delpoyed BPM in BPS Server in wso2?

I'm new to WSO2 products, I know while integrating BPS with ESB, we require the service of deployed Process
so My Question is:- Where to Find Web Service of Deployed BPM.
Deploying a BPM does not result in a Webservice, one or more processes will be deployed instead. You can find these under processes in the BPMN explorer https://[wso2server]:[port]/bpmn-explorer or they can be accessed through the BPMN rest API REST API Documentation.
If you want webservices that implement processes you should probably go with (WS-)BPEL. BPEL Reference
If you want to start/control the process from your webpage you can use the rest API. To start a process using the API you would send a POST request to the following URL:
https://<Host Name>:<Port>/bpmn/runtime/process-instances
This will create a new instance of the process you have specified in the Request body. All you need to put in the body to create the instance is either the processDefinitionId or processDefinitionKey (you can find both in the BPMN-explorer mentioned above). There are other, optional variables as well as the option to create your instance based on a message but this last option is not recommended.
{
   "processDefinitionKey":"sampleJavaServiceTask"
}
For more info on this, check out the link to the BPMN REST API

Call asmx web service from Windows Azure Scheduler

I have an asmx web service running in a Web Role in a Windows Azure cloud application. I want to user the Windows Azure scheduler to call this service on an hourly basis. I am able to create the job but everything I have tried in the URI results in an error.
I can call the same web service successfully from a web page using ajax using a URI such as :
http://www.example.com/myservice.asmx/TheFunction
but this form returns an error (when I use either a GET or a POST):
Request format is unrecognized for URL unexpectedly ending in '/TheFunction'.
Can anyone advise what format this URI should take?
Thanks
Don't know if this will help, but our team found that if you're using the brand new Management screens from the Azure Portal to do this, you can only set the URL and the Content, but you don't appear to have access to the request headers.
We were calling into an MVC application, and found that we need to add a header variable (Content-type: application/x-www-form-urlencoded) in order for our Router / Controllers to pull the associated POST arguments. We're looking at using the API to create the job instead, as there appears to be control over the headers using this method.
See the "headers" argument within the
Create Job Method in the Scheduler API.

Salesforce: SOAP Login from Salesforce TO Salesforce

I implemented a batch job which makes a webservice call within the same salesforce instance, which then is supposed to send emails with a pdf attachment,
since you cannot send pdf attachments directly from a batch job. My webservice call looks like this:
public static void callOut(List ids){
InvoiceAttachmentConnector.InvoiceAttachmentService ws = new InvoiceAttachmentConnector.InvoiceAttachmentService();
ws.SessionHeader = new InvoiceAttachmentConnector.SessionHeader_element();
ws.SessionHeader.sessionId = UserInfo.getSessionId();
ws.handleInvoicePdfAttachment(ids);
}
However in batch jobs UserInfo.getSessionId() returns null, therefore i get a INVALID_SESSION_ID exception.
How can i log in to get a SessionId? So far I found no solution to login from salesforce to salesforce. If u can help I would appreciate it! Thanks!
You cannot get a session Id like this in batch apex as it runs under the system context and so has no specific user info for retrieval.
UPDATE:
You have the following options:
Try running the web services wsdl from your Salesforce org through the wsdl to apex generator in your org to generate some classes that may allow you to login. You are only allowed one web service request per execute call.
You could create a sites page that you make a HTTP get request to in your batch apex. This needs to retrieve the Ids of the items you want to send the PDFs for and a particular user to run as for you to use the System.runAs(user) method. You could pass these parameters in the HTTPRequest header or in a custom setting.
Note that neither of these solutions are ideal, you may want to reconsider why you are using Batch apex first of all and see whether you could reimplement it in a different way.