Solved

Capture response Metrix 5 XML


Badge +6

Hi All,

i am planning to use perform method using metrix xml in map function.  how can we capture response in xml maps. 

 

as per document “Metrix 5 XML Messages” , 

 

ex: below is the xml message in map function .

 

<create_task result_name="CreateTask01">

       <request>

          <request_id>{requestId}</request_id>

       </request>

   </create_task>

 

Response ; 

<create_task_result result_name="CreateTask01">

       <task>

          <task_id>6198</task_id>

          <accepted>N</accepted>

          <plan_start_dttm>05/01/2012 03:19:00 PM</plan_start_dttm>

          <plan_travel_to_min>0</plan_travel_to_min>

          <plan_travel_return_min>0</plan_travel_return_min>

          <plan_travel_start_dttm>05/01/2012 03:19:00 PM</plan_travel_start_dttm>

          <fixed_commitment>N</fixed_commitment>

          <status>OP</status>

          <task_status>OPEN</task_status>

          <travel_to_distance>0</travel_to_distance>

          <travel_from_distance>0</travel_from_distance>

          <percent_complete>0</percent_complete>

          <request_id>15094</request_id>

          <reopened>N</reopened>

          <fixed_person>N</fixed_person>

          <split_allowed>N</split_allowed>

          <on_site_task>Y</on_site_task>

          <status_as_of>05/01/2012 03:18:57 PM</status_as_of>

          <add_meters>N</add_meters>

          <allow_ooh>N</allow_ooh>

          <override_ooh>N</override_ooh>

          <out_of_hours>N</out_of_hours>

          <pick_complete>N</pick_complete>

          <critical>N</critical>

          <created_by>STUDIO</created_by>

          <created_dttm>05/01/2012 03:18:57 PM</created_dttm>

       </task>

   </create_task_result>

 

how can we capture Task_id in “integration Map -XML” by using map function 

icon

Best answer by ruben.maas 7 June 2022, 09:24

View original

2 replies

Userlevel 5
Badge +13

Hi @seeda , 

 

You can use the Process Result Mapping to map the result to the respective record. 

For fetching the task_id the easiest solution is to use xpath “//task_id”, this will just return the value of the first <task_id> element in the xml response.

 

 

But what is it what you want to accomplish exactly?

hence, a create_task will only initialize a new task_id, it won’t actually create the task record for you. 

 

Thanks, 

 

Ruben

 

 

Badge +6

thank , this is helped me. our requirement to create place first using xml map and use place_id in request creation 

Reply