OTRS. How I can create ticket for unregister customers? - otrs

I use OTRS and not all clients want register in this system. In OTRS GUI I use a page (example.com/otrs/index.pl?Action=AgentTicketEmail) for create ticket by email. Last time I begin use OTRS API for creating ticket, but I don`t understood how use this method for unregister users.
Screen the form for creating ticket by email

You're right, the TicketCreate operation mandates having an existing customer user in OTRS. You could modify the TicketCreate operation (specified in Kernel/GenericInterface/Operation/Ticket/TicketCreate.pm) to not require this; or you could create a new operation where you could register your customers if needed.

Related

How to differentiate Basic/Premium plan users for premium-only features in Django REST?

I am working on a beta-stage writing tool SaaS that is built with NextJS, React, and Django REST. As I’m gaining some user base, I am starting to research on introducing a premium plan to the mix using Stripe.
As most other SaaSs, I will have a subscription-based premium plan which grants access to premium-only features. However, even after days of research, I am still lost how this is commonly implemented in Django/Backend. Here is what I’ve thought of so far, but again, I am not sure if it’s the best/common way to accomplish this.
User model has a ‘premium’ field which is either True or False
Whenever user clicks on a premium-only API call, Django will check if user is premium or not to decide whether to make the actual API call. I currently have a '/user/me/' route which returns basic user information as API GET call.
Upon successful stripe payment, stripe redirects user to the success_url. Then, somehow I will detect when user lands on success_url and then set that user’s premium field to True.
I know this is not the ideal way, because I already see lots of issues/hurdles:
How will I set ‘premium’ field back to False after user’s payment stops
How can I ‘detect’ stripe’s payment to set user’s premium field
Is this feature supposed to be implemented with Stripe customer objects instead? I would appreciate any guidance on where I should be looking for solutions.
If you use subscription on Checkout Session (low code solution), you can add additional key-value pair data such as premium: true in metadata and subscription_data.metadata fields when creating a subscription.
Once the payment is completed, those metadata will appear in checkout.session.completed and customer.subscription.updated webhook events, which you can then set the user as premium in your own database.
A customer object in Stripe can have multiple subscriptions, so this feature will be implemented on subscription object instead.

Apply more filtering in OTRS Ticket Search and Get

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?

Sitecore contact tracking: how does it work?

I have read through
https://sitecore-community.github.io/docs/xDB/the-xdb-contact/ and https://doc.sitecore.net/sitecore_experience_platform/81/setting_up__maintaining/xdb/contacts/contact_tracking.
I would like to know whether Sitecore contact tracking will work for my client or not.
I have created a simple newsletter subscription functionality (without WFFM form submission). Once a user submits his information along with personal details and email, I send a confirmation email link. After confirming the email address, I am creating contacts through code. Thanks to Brian!
My application session state mode is InProc.
My question is, if user is interacting with the site with a new session after subscription (after submitting email):
Will Sitecore identify user as contact (and merge in existing anonymous contact) or will it create new anonymous contact each time?
I am NOT using any of the following services in my solution:
Device detection
GeoIp Service
FXM
Your approach
It seems to me that manually creating contacts is completely unnecessary in your case.
As I understand from your post, here's what happens:
A user visits your website.
Sitecore creates a new contact (ID: xxx).
The user browses the website and submits your form.
A confirmation email is sent to the user's email address.
The user clicks on the link in the email and hits a confirmation page on the site.
Your code creates a new contact in xDB (ID: yyy).
As a result, you have two separate contacts in xDB that are not related to each other, from Sitecore's perspective.
Now, to your question:
Will Sitecore identify user as contact (and merge in existing anonymous contact) or will it create new anonymous contact each time?
If the user is visiting from the same browser, Sitecore will recognize them as the original contact (ID: xxx) based on a cookie. Sitecore will not create a new contact in this case.
If the user is visiting from another browser or device, he will not be recognized as any of the existing contacts and a new anonymous contact will be created (ID: zzz).
As you can see, Sitecore has no way of automatically using the contact you created (ID: yyy).
Suggested solution
The only way to make Sitecore recognize a user as a specific contact is to use the identification API. In short, what you can do is this:
Sitecore.Analytics.Tracker.Current.Session.Identify(identifier);
Here's what I suggest you to do:
Do not create new contacts manually—there's just no need for that.
When the user has submitted the form, you invoke Identify() and pass the user's email address as the identifier. This will set the user's email address as the identifier of the current contact.
When the user comes back from the email link you sent, you invoke Identify() once again. This will make sure that, even if the user is coming from another device, the same xDB contact will be used in his session. You'll need to pass the same email address to Identify(), so make sure you have access to it—for example, you can include it in your email confirmation link as a query string parameter.
Use Sitecore.Analytics.Tracker.Current.Contact and populate the current contact's facets with the information you've collected about the user.
If you have a login functionality, remember to invoke Identify() on successful login attempts—again, this is to ensure that the same contact is used for all sessions of the same user.

How to store additional information about the Users in Django ?

I have several notifications that can be sent out from my Django application for users. These users are managed with the django.contrib.auth app.
I need to keep track for each whether the user has specified he/she wants to get that notification.
Where should I save this information?
I was going to create my own custom table but I've seen perhaps I can save that information somewhere in the auth module?
User Profiles are a good way to go.
https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
Set up a model with a OneToOneField to your User object as described and you have easy access to an arbitrary table of extra information.
PS: Heed the note about the fact that profiles are not automatically created. There is an example about how to use a Signal to automatically create one whenever a User is created.

Real-time updates only for app's users?

I've been reading the real-time updates documentation for a while and I can't seem to find an answer. Can I use this feature only for the app's users? Can't I define a list of IDs that I want to receive the public feed from(even though not app's users)?
Thanks a lot
From the documentation:
Objects
You can currently subscribe to updates for these types of objects:
user – Get notifications about particular fields and connections
corresponding to user nodes in the Graph API.
permissions – Get
notifications when your users change the permissions they afford your
applications. The fields are like those in the corresponding FQL
table.
page - Get notifications when pages that have installed your
application change their public properties. Note that the page topic
is only used for subscribing to changes to public attributes of the
page (like name, category, picture etc). This is the same information
that is returned by the graph api call
https://graph.facebook.com/. You can subscribe to the page's
feed in the same way you subscribe to a user's feed - the subscription
topic should be 'user' and the subscription field should be 'feed'
These objects are related to YOUR application, so it would be updates from users of your applications, permissions related to your application, etc..