Question

API - Service Order - How to add priority class instead of priority?

  • 24 January 2022
  • 5 replies
  • 117 views

Badge +1
  • Sidekick (Customer)
  • 7 replies

We are working on a default template voor Service Order creation via API. We use priority based SLA's.. so I want the customer the be able to add the correct priority in the XML.

 

So we do not want to use  <priority>51</priority>, but rather let the customer fill in the priority_class_id. It seems that this cannot be used when creating a Service Order via the API.


How can we incorporate this into the Service Order schema?

 

<?xml version="1.0"?>
<root
    xmlns="http://astea.com.schema.bc.Service_Order"
    xmlns:dt="urn:schemas-microsoft-com:datatypes">
    <session email="" alias="">
        <state bc_name="Service_Order">
            <action name="data-NEW">
                <main>
                    <row>
                        <cust_company_id/>
                        <site_company_id>example_company_1</site_company_id>
                        <cconth_id>example_contract_1</cconth_id>
                        <callt_id>SERVICE</callt_id>
                        <problem_desc>Your problem description here</problem_desc>
                        <priority>51</priority>
                        <refno>example_reference_1</refno>
                        <actgr_id>SCR-BE</actgr_id>
                        <call_source_id>MAIL</call_source_id>
                        <open_date>2022-01-24</open_date>
                        <open_time>14:00:00</open_time>
                    </row>
                </main>
            </action>
        </state>
    </session>
</root>

 

 


5 replies

Userlevel 7
Badge +21

Hi Gijs,

I don’t believe you can define a priority class directly via an API as this is usually picked up by the assigned priority and the class has a range of priorities.

Excerpt from ST7-1 - Order Setup.pdf

However, I believe you could use impact code / urgency as mentioned in the above excerpt where the customer supplies their information and then this drives which priority is selected when defined in the priority mapping module definitions.

 

Hope this helps.

Phil

Userlevel 6
Badge +10

Hi Gijs,

 

As Phil has explained priority class is having a number range, while Service Order priority is a number.

You need to modify the API by calling a query and pick either the low end (fr_priority) or high end number (to_priority).

 

Below is the API sample if you want to update using Priority Class ID = HIGH and pick the lower end priority number:

 

<root xmlns="http://astea.com.schema.bc.Service_Order" xmlns:dt="urn:schemas-microsoft-com:datatypes">
    <session email="" alias="">
        <state bc_name="Service_Order">
              <action name="declare">
                  <attribute dtype="string" in_var="" out_var="" name="PriorityID" value="" />
              </action>
              <action name="getdescrtableex">
                  <attribute in_var="" out_var="PriorityID" table_name="priority_class" element_name="fr_priority" search_criteria="priority_class_id = 'HIGH'" default_value="1" />
              </action>

            <action name="data">
                <main>
                    <row>
                        <cust_company_id/>
                        <site_company_id>example_company_1</site_company_id>
                        <cconth_id>example_contract_1</cconth_id>
                        <callt_id>SERVICE</callt_id>
                        <problem_desc>Your problem description here</problem_desc>
                        <priority dtype="int" in_var="PriorityID" out_var="">in_var</priority>
                        <refno>example_reference_1</refno>
                        <actgr_id>SCR-BE</actgr_id>
                        <call_source_id>MAIL</call_source_id>
                        <open_date>2022-01-24</open_date>
                        <open_time>14:00:00</open_time>
                    </row>
                </main>
            </action>
        </state>
    </session>
</root>

 

Good luck.

 

Regards,

Joshua

Userlevel 4
Badge +9

is it advisable to configure our Priority Classes like this ?

Doing it this way,  can use a 1on 1 number- priority relation in the integration ?

 

Userlevel 6
Badge +10

I don’t see a problem setting Priority Classes range with one number.

Userlevel 7
Badge +21

Following up on Joshua’s response.  Technically there would not be any issues doing this but you do lose any flexibility you have to manage different priorities within the same priority class.  If this is ok, it is fine.  This then means you would have your customer’s integration still supplying the priority ID and not the priority class itself which is what Gijs wanted to avoid though is now one-to-one mapping with your suggestion.

Later, what happens if you decide you need to have different priority id’s within the same priority class?  You would have to arrange all your customers to re-map their integrations too.  This is why I thought perhaps using urgency and impact might give you more flexibility than straight out mapping to a specific priority id.

I suggest discussing this with Gijs and perhaps also the IFS Consultant working with your implementation.

 

Reply