Apply more filtering in OTRS Ticket Search and Get - otrs

I am new to OTRS. In one of the workflows I fetch ticket info via Ticket API.
I want only specific fields like Subject and SenderType. I do not need to download the entire ticket data.
Also, I need to apply filters at article level(apart form Article Create Time I need Article Subject contains ) and download specific article info instead of the entire ticket data. There are more clients requesting data from OTRS and I am hitting the limits.
Can I accomplish these? If so how? Do I need to create Webservice or other functionalities.
On a separate note, Where do i find info on Webservice creation in OTRS and Webhooks?

Related

Create complex order with Stripe payment

I am trying to allow my users to pay for their booking (for an event) on my website using Stripe. I've got most of the processing working well but I don't know how to connect the response I get from Stripe which indicates that the payment has been successful to my database so that it knows all the details required to make the booking.
In the standard situation of "buying X number of products", I know that I can create an order on the server which contains those details. Then I can put that order ID into the Stripe request and I can use that when the payment is successful to go and fulfil that order.
But in my case, I have to accept a load more information than that. Each booking can have multiple attendees attached to it - each attendee will have a name and load more information about them which needs to be used when the booking is created.
Is the only way to do this to add ALL of this attendee information in to the request to Stripe so that it can be used when the payment succeeds? Or is there another way?
If it helps to answer this question, I'm using Django on the backend.
The main way to achieve this is to:
Store the information related to the order in your own database with the corresponding payment intent ID (or checkout session ID).
Listen to the webhook event payment_intent.succeeded (or checkout.session.completed) to know when the payment is successful.
In the webhook event, get the payment ID with event.data.object.id and use that to look into your database to retrieve the information needed to fulfill the order.
You can learn more on how to fulfill orders in the Stripe documentation here.
Another option would be to use the metadata field of your payment intent (or checkout session) to directly store all the information related to the order. But I wouldn’t recommend this since it has some limitations (number of keys, length of values, etc.).

First Review or opening date in Google places API

Im trying to obtain the date when a store was created on Google Places API, that information is not available on the API.I think, that I can do if I retrieve the first review date, but the API give me only 5 reviews.
Any ideas for obtain the date? or a similar service? I checked facebook and forsquare, but the same results.
Currently this information is not exposed via Places API. There are following feature requests in Google issue tracker that you might be interested in:
Expose creation date and date of last update in Place Details
Google Places API Reviews, changing the sorting order?
Places API: Response to Include More Than 5 Reviews
I would suggest starring these feature requests to add your vote and subscribe to further notifications from Google. Hopefully one day they implement these feature requests.

Saving Data To Sitecore Analytics From Custom Code

I have been using Sitecore for a couple of years, and now looking to begin utilizing the Experience functionality found in Sitecore 8.
I have a view that will capture some user-provided data. How do I go about creating a "person" (don't know the correct Sitecore terminology) in the Analytics database from custom code.
You'll need to create a Contact. Contacts are a kind of profile store for xDb and allows you to store data about your visitors. A contact has a built in list of facets (email, phone number, name etc) that make up the contact record, but it's also possible to create your own facets.
If you are building a form to capture data you can use the new Tracker api to identify and update facets on a contact.
Here's some code to do this:
https://github.com/ianjohngraham/CoreBlimey.Utils/blob/master/CoreBlimey.Utils/xDB%20Contact%20Creator/CreateContact.aspx.cs
There's a walk through of how the code fits together here:
https://m.youtube.com/watch?v=Jq6TpMgUGAk
(Apologies for the sound quality)
Also if you are using the WFFM module in Sitecore 8 there are some new save actions that will create contacts and store xDB data.
You may want to spend time on the docs. Please refer here for articles and guides related to Personalization and Personas.
Most of the configuration can be specified in Experience Analytics within Sitecore and you can leverage Rules Engine to perform actions.

Authorize.net "x_description"

I need to be able to pass identifying information through to Authorize.net's server so I can use this information when the confirmation comes back for logging purposes. We have information such as IDs for the items we sell on our site, and I'd like to have Authorize.net's response include this information to plug into our database along with the rest of the transaction data that Authorize.net's API natively supplies. Sort of like "merchant-private-data" in Google Checkout carts.
The only field I see that doesn't hold some other specific information in Authorize.net's API is x_description. My question is does the data in x_description get displayed to the customer at any point? The information I'd like to include is sensitive and not for customer's eyes. I've been over the API documentation provided by Authorize.net and it's not clear to me what is done with this field.
If this field is not private, is there a better solution to my problem which I am not seeing?
Dig through their list of API fields and see what you can use. If you want to build a list of line items, for example, look at their x_line_item field. If you're using the AIM/CIM SDK and not telling Authorize.net to e-mail a receipt then I don't see how the customer would see anything you submit to Authorize.net besides the charge on their credit card. If your customer does receive an e-mail directly from Authorize.net though, they will most likely see everything you submit. But double-check the docs I linked to be sure.
You have x_description, but also x_invoice_num and x_po_num. These fields are for the internal use of the merchant. The fields x_description and x_invoice_num can be set in the virtual terminal, if you use it to submit transactions, and also via the API. Authorize.net will return them in the response. If you set any of these two fields in an automatic recurring billing subscription, it will be returned in each individual payment response. They might be included in the email receipt also - I never used the authorize.net email receipt to the buyer. You can disable this email receipt and send your own email receipt.
I know x_description gets sent in plain text to the merchant's email, so I wouldn't use it for anything too sensitive. The description does not, however, appear on my credit card statement (as a customer).
There is another field you can use, refId. It's not well documented, but what you pass in refId will be returned in the response object as refId.
Personally, I recommend creating a database table to store your data, and then use refId to keep track of the insert ID.

Can I have my app scan my Twitter stream for news to show the user?

I would like to be able to show short news messages to users of my app. I am thinking the nicest way to do this would be to add a hashtag (like #appnews) to my Twitter updates that I want shown in-app; my app will make this happen by scanning my Twitter stream at startup and surfacing updates with that hashtag. This seems super-simple, and I'd like to know if there's some way to do this via built-in (HTTP?) calls to my Twitter page, rather than incorporating a whole framework like MGTwitterEngine. The user will not be logging in or posting Twitter updates at any point.
Thanks!
You can retrieve any user's public tweets in XML format by retrieving the following URL:
http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=DWRoelands
(This example will display my tweets). Once you've got the list of tweets, you can parse through the XML document in whatever way is easiest for you.
Rather than tagging posts with a hash tag, I would recommend simply starting a new Twitter account that is solely for the news items you described.