Info |
---|
Module Required: The functionality described below requires that you have the Resource Management module enabled in the EngageIP AdminPortal, if the module is not active the options detailed in this article will not be present in your EngageIP installation. Contact your LogiSense |
...
account |
...
representative if you wish to discuss adding this module to your installation. |
Table of Contents |
---|
Creating a DID Resource Type
...
The first is the “Item Quantity Script”. It is a JavaScript function that is used on the page where new items are being added to the system and allows for batch entry of items. For example, DIDs are typically added in sequential blocks (i.e. 519-658-0000 to 519-658-0999). The “Item Quantity Script” parses the items entered on the page to determine how many items are included in the block. For example, if there was a request for 1000 DIDs and you entered “5196580000-0999”, the script would parse that entry and determine that there are 1000 phone numbers. Once the correct number of items have been entered you can click Save and the items will be added to the system. You could also enter 2 items, “5196580000-0499” and “5196210000-0499”, which in combination would give you 1000 items and satisfy the requirements. A script for handling DIDs is as follows:
Code Block | ||
---|---|---|
| ||
var start = input.split("-")[0]; var end = input.split("-")[1]; var fullend = start.substr(0, start.length - end.length) + end; return fullend - start + 1; |
The other script is the “Add Item Script”. This C# script is similar in that it parses the items entered, but this script is responsible for actually creating the items in the system. A script for handling DIDs is as follows:
Code Block | ||
---|---|---|
| ||
string item = context["item"].ToString(); ResourceRequest resourceRequest = context["resourceRequest"] as ResourceRequest; string start = item.Split('-')[0]; string end = item.Split('-')[1]; string fullend = start.Substring(0, start.Length - end.Length) + end; long quantity = Convert.ToInt64(fullend) - Convert.ToInt64(start) + 1; for (long i = 0; i < quantity; i++) { ResourceItem ri = ResourceItem.GetNew(); ri.Name = (Convert.ToInt64(start) + i).ToString(); ri.ResourceRequestID = resourceRequest.ID; ri.ResourceTypeCategoryID = resourceRequest.ResourceTypeCategoryID; ri.ResourceTypeID = resourceRequest.ResourceTypeID; ri.Create(); } return true; |
...
Resource Items are grouped into Categories in the system. These Categories can then be assigned to owners to allow the Owner to allocate Items from that Category. For example you may have two Categories “US” and “Canada” to group your DIDs into their geographic regions. You can then give some of your dealers access to the “US” Category, and others have access to the “Canada” Category (i.e. if they only operate in one country).
...