Greetings ,
I am trying to using the BatchFacade in the C# SDK to create a session and then log that session in as our anonymous user. I can see how a developer can use the BatchFacade to do this. Seems fairly straightforward to me.
I kept getting an error in my batch and isolated it down to creating a Session through the BatchFacade. Assume that tessituraService is already instantiated and credentialed:
SessionRequest sessionRequest = new SessionRequest() { IpAddress = String.Empty }; BatchResponse batchResponse = await tessituraService.BatchFacade .With(tessituraService.BatchFacade.Web.Session.CreateSession(sessionRequest)) .Call();
The batch fails and I get the Error message:
{ "Requests": [ { "Id": 1, "HttpMethod": "POST", "Uri": "http://xxxxx/TessituraService/Web/Session/", "ContinueOnError": false, "Content": { "IpAddress": "", "BusinessUnitId": 0, "Organization": null }, "DependsOnRequests": null, "ReturnTypeString": "Tessitura.Service.Contract.SessionResponse" } ] }
Just taking a step back here... The original premise of this is to log in the Anonymous web user using a batch call. In reading the past help documentation it's been the recommended practice to have an anonymous web user and log that user in before transacting on the web. In shifting the the REST API, this is still a necessary practice? I would assume so since the user will have a cart and could potentially be reserving seats with that anonymous account. Did want to ask that up-front though. I am assuming we will uncover the answer to this as we continue to work on REST integration. Any insight here is appreciated. Thanks as always.
Hi Randolph,Anonymous users are no longer needed with REST API as you can add items to your basket without being logged in. All information can be saved to the cart using constituent 0 and transferred to the constituent once they've logged in as before. There is also a new feature in V14 loginAsGuest Web/Session/{sessionKey}/LoginAsGuest this new method allows you to log in a customer using just their email and so they can complete a transaction without creating an account. If the email matches an email on the system it will use that account to make the order. For security guest login does not give access to personal information on the account but it is still pretty useful for quick sales.
Thanks for the reply, William, and thanks for pointing out the LoginAsGuest feature as well. This was something we didn't know about but will definitely be making good use of.
Hi Randolph,
If you or your team are available, we have started talking about items like this that are updated in the API on our Bi-Monthly Developer Coffee calls. You can register for them here:
https://attendee.gototraining.com/r/1584268002172426242
We record them all and upload them to the Developer Portal:
https://developer.tessituranetwork.com/display/devportal/Virtual+Coffee
If you need access to the Developer Portal, you can email webmaster@tessituranetwork.com to request it. The April 5 coffee goes into detail about many recent updates to the REST API that make it easier to work with.
Also, if you can join the TN_WEB_SHARE Slack channel, its also a good place to stay up to date on the latest information about the API.
To join Slack, email webmaster@tessituranetwork.com with people you'd like to add from your organization.
Thanks!
Chris
Hi Chris,
Thanks a lot for the invite. We will join up with all of those channels!