Skip to main content

Hi all.

We have just upgraded our test environment ETM to 1.7 which introduces the HTTP(S) to the mix and are putting it through its paces to see what we could use it for.

One use case we are looking at is possibly replacing a script we have running on our integration VM. We use future actions to trigger a stop clock action, with assyst user setting the date to ‘come off hold’ and leaving the success checkbox as false. The script (SQL included below) will query the DB and find tickets due to come off hold.

select top 5 act_reg_id ACT_REG_ID
, act_type.act_type_n "HOLD_ACTION"
, date_actioned "ACT_DATE"
, act_reg.incident_id "INCIDENT_ID"
, incident.incident_ref "REMIND_INC_REF"
,incident.type_enum
from act_reg
inner join incident on incident.incident_id = act_reg.incident_id
inner join inc_data on incident.incident_id = inc_data.incident_id
inner join act_type on act_reg.act_type_id = act_type.act_type_id
left join assyst_usr on incident.ass_usr_id = assyst_usr.assyst_usr_id
where act_success = 'n'
and date_actioned < getdate()
and act_type.act_type_sc in (]] .. HOLD_ACTIONS .. .)
and inc_data.u_date1 >''
and incident.status_enum = 1
order by date_actioned

My own attempts and the lack of options presented in an ETM variable search suggests it might not be possible.

ETM action search options

 

Has anyone successfully built this kind of query into Rest before?

 

Any help greatly appreciated. Thanks.

I doubt this is possible in REST - though you should see a lot more query parameters if you scroll down the dropdown. 

 

ETM 1.8 adds the ability to run sql queries as a step in processing - so you may be able to use that. You’d probably want a scheduled import channel to run the query mapper, and then an iterating mapper to process the returned actions.


Reply