These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
ANSWERED

Refresh Tokens

We have an SSO using the out of the box ipart and process that is working with 20.2 and was working with 20.3 until the recent August changes to the refresh token. I understand that it is only good for 1 hour and can be invalidated when the cache is cleared. What would cause the cache to be cleared? Also, can you use the refresh token more than once?
ANSWERED

'https://yourorgsite.com/api/LegacyOrder/_execute' Invoice - what to provide for legacyOrderStageInvoiceProcessingData?

Dear all, could someone point me to the correct object definition please? https://developer.imis.com/reference/executesmlegacyorder#invoice { "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts", "OperationName": "Invoice", "EntityTypeName": "LegacyOrder", "Parameters": { "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib", "$values": [ { "$type": "Asi.Soa.Commerce.DataContracts.Order.LegacyOrderStageInvoiceProcessingData", "$value": "legacyOrderStageInvoiceProcessingData Value" } ] }, "ParameterTypeName": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "Asi.Soa.Commerce.DataContracts.Order.LegacyOrderStageInvoiceProcessingData" ] }, "UseJson": false } What needs to go into the legacyOrderStageInvoiceProcessingData object? Any help is much appreciated. Thank you! Alexander
ANSWERED

membership trends over time

I believe there are no reports in the system where you can get information on what your membership numbers have done over time. How on earth can you run a membership system if you can't see trends. Am I missing something??
ANSWERED

ComboOrder for product order and update UD field

Hello! Anyone knows how to update the UD fields for orderlines when creating order using ComboOrder?
ANSWERED

REST API Public User with Access to Info

Hello, I'm concerned about this situation: I just created a Public User in Imis and didn't change any permission to it. I found that using the following script from the browser console, this new Public User (after I logged in with his credentials in Rise) could do many listings like the one below. Could you help me understand why ? I need to let him just read information, but I'd like to know how to block Public Users from reading information. jQuery.ajax("https://mytest-imis123.com/imis/api/Party", { type : "get", contentType: "application/json", headers: {"RequestVerificationToken": document.getElementById("__RequestVerificationToken").value}, success: function(data){console.log(data);} }) Thank you !
ANSWERED

How To: Use iMIS REST API to embed a virtual file path in an IQA result

This 'how to' was developed in response to an iMIS customer that is experiencing poor page load times due to overuse of included images from IQA query results. I'm posting it here hopes that it proves useful to others in the community. **The problem:** One of the really nifty things you can do with iMIS is embed images directly into a page from IQA results by injecting markup into the display column property(ies) of an IQA. Unfortunately, if an IQA returns multiple rows, or returns images that are of indeterminant size, this practice can result in very large web pages that perform poorly because they are a) huge and b) cannot take advantage of caching and other performance optimizations within the browser or our hosting environment. This problem can be managed by tightly controlling the sizes of the images included in the IQA results, but that can require a significant effort from staff and you can still wind up with problems in environments where members/users can upload new images without staff intervention. **The solution:** most iMIS iParts get around this issue by obtaining a URL path to an image from the iMIS service API. If you're developing a custom iPart that displays images from the iMIS database, you're probably already aware of how to get a virtual file path from the API, however, if you're using images with one of our more generic web parts like a QueryList, you'll need something more along the lines of what I'm posting here. **Summary:** The basic idea is pretty simple: instead of embedding the actual encoded image in the query display, we just want to embed the data the API will need in order to retrieve a file path, and then we add javascript to obtain the file path once the document is loaded. **Step 1:** Embed our API parameters in the display properties of the query. This is done from the Display tab of the IQA. Add a custom column that injects markup with data you'll need to get an image file path. In the case of an IQA with a contact BO source, we can get the member profile image, just need the party id to get the member's profile image path: Example: '<span class="image" id="my_image_prefix_' + vBoNetContactData.Id + '" ></span>' **Step 2:** Add javascript to the content record page <head> tag that scans the document for elements that match our id attribute prefix, makes the API call, and adds the image file to the document. Javascript can be added in PageBuilder under the 'Advanced' section of the page's 'Properties' tab. Example: function setImageUrls(){ const tagPrefix = 'my_image_prefix_'; // all of the <span> tags in the doc that start with our tag prefix const imageSpans = document.querySelectorAll('span[id^="my_image_prefix_"]'); // set the background image style for each tag to the correct virtual file path to the virtual file path imageSpans.forEach(function(currentValue){ const idAttr = currentValue.getAttribute("id"); const partyId = idAttr.substr(tagPrefix.length); console.log(idAttr + ", " + partyId); fetchProfileVirtualFileData(partyId, idAttr); }); } function fetchProfileVirtualFileData(partyId, idAttr) { let xhr = new XMLHttpRequest(); xhr.open('POST', "https://my.imisdomain.com/api/PartyImage/_execute", true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.setRequestHeader('RequestVerificationToken', document.getElementById("__RequestVerificationToken").value); xhr.onload = function() { let response = null; if (xhr.status === 200 || xhr.status === 201 || xhr.status === 202) { if (xhr.responseText) { var virtualFile = JSON.parse(xhr.responseText); console.log(JSON.stringify(virtualFile)); console.log(virtualFile.Result["VirtualPath"]); let virtualPath = virtualFile.Result["VirtualPath"]; if (virtualPath.startsWith('~')){ virtualPath = virtualPath.substr(1); } const imageSpan = document.getElementById(idAttr); imageSpan.style.backgroundImage = "url(" + virtualPath + ")"; } } }; xhr.send(JSON.stringify(getProfileVirtualFileRequestBody(partyId))); } function getProfileVirtualFileRequestBody(partyId){ const requestBody = { "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts", "OperationName": "GetProfileVirtualFile", "EntityTypeName": "PartyImage", "Parameters": { "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib", "$values": [ { "$type": "System.String", "$value": partyId } ] }, "ParameterTypeName": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "System.String" ] }, "UseJson": false }; return requestBody; } window.addEventListener("DOMContentLoaded", setImageUrls); Theoretically, this can be done much more succinctly via the javascript Fetch API, but I've done this example using XHR because I'm still learning the ins and outs of fetch. If anyone comes across this and wants to post an example using fetch that'd be awesome =)! Hope this helps the community! Cheers! See Also: https://developer.imis.com/reference/partyimage Base64 image encoding pros and cons: https://bunny.net/blog/why-optimizing-your-images-with-base64-is-almost-always-a-bad-idea/ https://stackoverflow.com/questions/1574961/how-much-faster-is-it-to-use-inline-base64-images-for-a-web-site-than-just-linki
ANSWERED

I Need Help On PersonData Update Operations

I tried to use the minimum data for testing the update operations on "PersonData". I am using REST API. I have tried all possible ways that I can think of. But I got no result. In the example below, I tried to update the "InformalName". This end point was used: https://{baseURL}/api/Party/{PartyId} Method used: client = new HttpClient(); client.PutAsync(uri, httpContent) This was sent to the server: { "$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Soa.Membership.Contracts", "PersonName": { "$type": "Asi.Soa.Membership.DataContracts.PersonNameData, Asi.Soa.Membership.Contracts", "FirstName": "TestFirstName", "InformalName": "William", "LastName": "TestLastName", "NamePrefix": "Mr.", "FullName": "Mr. TestFirstName TestLastName" }, "SortIsOverridden": false, "PartyId": "9413326", "Id": "9413326" } Unable to update the target party data! StatusCode: 400, ReasonPhrase: 'Validation error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Pragma: no-cache Cache-Control: no-cache Server: Microsoft-IIS/10.0 Server: Microsoft-IIS/10.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET X-Powered-By: ASP.NET X-Frame-Options: sameorigin Content-Security-Policy: frame-ancestors 'self' Strict-Transport-Security: max-age=31536000 Date: Wed, 17 Nov 2021 20:47:42 GMT Content-Length: 583 Content-Type: text/plain; charset=utf-8 Expires: -1 }
ANSWERED

Query definition

Hi, Is the only way to get the definition of a query through a POST to /QueryDefinition/_execute It looks like the response includes a Parameters section with an array of the propted parameters, but it does not include the data type of the property, or whether the query has a preselected value for a specific field There also doesn't seem to be any way to identify whether the said property should have a value list associated with it. Is there any other end point that provides the above definition information for IQAs? Thanks, Martin There is a Values node with a $values array, but in all the examples I've looks at it's empty, so I'm not sure what it's supposed to return.
ANSWERED

Please allow PUT at /api/Order_Badge endpoint.

Hello, I have found it very difficult to update Order_Badge data through the staff site. I noticed that the API can get Order_Badge data and that new badge data can be posted, but the endpoint does not allow for updating an existing badge using the PUT command. This would be very helpful. Thanks, Korey
ANSWERED

IQA List in Directory API 2017

Hi all, I am trying to return a list of IQA's in a particular directory and am just wondering what API I should be using to return the IQA list? Cheers