Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
iHub scheduling dynamic parameters
Nikhil Mahajan
<p>Hi,</p>
<p> </p>
<p>I am trying to schedule a report which takes user Id as parameter. I have created a group of users and I want that report to emailed to each of the user of the group.</p>
<p> </p>
<p>But during scheduling we have pass the parameters statically. so is there way the user who is notified via email gets the report corresponding to his userId. i.e I want to pass <strong>userId </strong> as parameter to the scheduled report as depending on the user to whom it sent from the group.</p>
<p> </p>
<p>Is this possible.</p>
<p> </p>
<p>Thanks</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>I'm not clear on specifically what you are wanting to accomplish.</p>
<p> </p>
<p>Are you wanting a different version of the report, based on the user id, to be emailed to each of the users in the group individually?</p>
<p>Can you provide some additional details on the use case?</p>
Nikhil Mahajan
<p>Yes I want each user to be sent the same report but with different data depending on the parameter of that report which will be <strong>userId </strong>of user to whom that report will be sent from a group.</p>
<p> </p>
<p>Actually I am scheduling a weekly summary report with userId as parameter that will sent as PDF attachment to a user. Now each user will have different weekly summary depending on the his Id. </p>
<p>Now when I schedule a report for a single user I can pass the userId paraneter there to get the report. That is ok. But If I have to schedule the report for a <strong>user group </strong>I can't set that parameter <strong>userID</strong> corresponding to each user in the group. </p>
<p> </p>
<p>So what I want is to have scheduling for a group which will generate different copies of that report for each user in that group depending on userId so that each user receive the report corresponding to his own id only.</p>
<p> </p>
<p> </p>
<p>Thanks.</p>
JFreeman
<p>A separate scheduled job is going to need to be created for the report for each user that needs to receive a different copy of the report. In order to do this for each user in a user group, you will need to create something custom using one of the APIs to read all of the users in the group and then create a separate scheduled job for each user in the group.</p>
<p> </p>
<p>Within iHub 3.1, the REST API can be used to achieve this behavior.</p>
<p>Alternatively, you can use the Information Delivery API (IDAPI) to also achieve this behavior.</p>
actuser9
<p>Hi Nikhil,</p>
<p> </p>
<p>I have a similar requirement. Were you able to achieve with the APIs?</p>
<p> </p>
<p>Hi Jesse,</p>
<p> </p>
<p>Thanks for the suggestions. Do you have any sample code that would achieve this?</p>
JFreeman
<p>Unfortunately, I do not have any sample code already created for this requirement.</p>
<p> </p>
<p>Can you provide some more details about your specific scenario and I can see what I can find or create.</p>
actuser9
<p>Hi Jesse,<br>
<br>
I have attached a sample report which shows customer number and name. Currently, all the customers data is sent to all the sales representatives when the report is scheduled from iHub2.<br>
<br>
Based on the "Data Set" results, for all of the sales employees available, I want to email the customer name and customer name to the individual sales person.<br>
<br>
We can filter and create for each sales person from iHub2 scheduler, but whenever a new sales person is added or not available from the dataset, scheduler changes are involved and the code is intended to remove any manual intervention. Please advise.</p>
<p> </p>
<p>
JFreeman
<p>Okay, I believe I understand.</p>
<p> </p>
<p>You can use the selectRoles and selectUsers calls with IDAPI to get the user/role details to dynamically determine which users need to have a scheduled job for the report. You can then use selectJobs and getJobDetails to determine the current schedule jobs and if a new job or modifications are needed based on a comparison to the user/role list already obtained.Then you can use updateJobSchedule and submitJob to modify and/or create new jobs as needed.</p>
<p> </p>
<p>I do not have an example of this full process of hand. However, this documentation should be a good starting place: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/Manualsihub2/using-ihub-integration-tech.pdf'>http://developer.actuate.com/be/documentation/Manualsihub2/using-ihub-integration-tech.pdf</a></p>
;
actuser9
<p>Ok, Thanks Jesse! I will let you know when I have more questions.</p>