Skip to main content
Solved

Error Contract Import v15.4

  • November 25, 2022
  • 8 replies
  • 85 views

bskallerud
Hero (Customer)
Forum|alt.badge.img+12

We have a contract import (Customer Contracts) that works well in 15.2. We have now upgraded our UAT to 15.4, and have an issue with this import. No matgter what we do, we get the error that “PM Rule is mandatory”. We have a PM Rule PRSTD that we almost always use, but there seems to be a bit of change in the logic regarding PM Rules - the import should automatically create a price rule based on PRSTD on import.

Here is the log:

But the error-message on server is a bit weird (maybe?):

Any advice would be greatly appreciated. 

Best answer by Joshua Liem

Hi Bjørn,

 

Depending on Contract Request Type, cconth.pm_charge_rule and/or cconth.um_charge_rule is/are mandatory. In your scenario (as you don’t specify) please check the default Request Type and populate pm_charge_rule and/or um_charge_rule accordingly.

Hopefully this helps.

 

Regards,

Joshua

8 replies

Forum|alt.badge.img+12
  • Superhero (Employee)
  • Answer
  • November 26, 2022

Hi Bjørn,

 

Depending on Contract Request Type, cconth.pm_charge_rule and/or cconth.um_charge_rule is/are mandatory. In your scenario (as you don’t specify) please check the default Request Type and populate pm_charge_rule and/or um_charge_rule accordingly.

Hopefully this helps.

 

Regards,

Joshua


bskallerud
Hero (Customer)
Forum|alt.badge.img+12
  • Author
  • Hero (Customer)
  • November 28, 2022

Hi Joshua

If you see above, we have supplied value for PM Charge Rule (PMSTD), but still it fails.

We’ve had to rebuild other imports as well, as the standard imports fail. Installed Items is another we have issues with


Phil Seifert
Ultimate Hero (Employee)
Forum|alt.badge.img+24
  • Ultimate Hero (Employee)
  • November 28, 2022

Hi Bjørn,

I am somewhat confused, you indicate in the screenshot you are submitting PRSTD but then in your response to Joshua you say you are supplying PMSTD.  These are two different values so I am sure you meant to say PRSTD as that is what is in your database, not PMSTD.

Can you supply the actual API in a text form instead of a picture so we can more easily review this situation?

I think what Joshua is trying to say is that you are supplying a single pricing rule with the value as PRSTD while Request Type is B (for both PM and UM).  Perhaps supplying pm_charge_rule and um_charge_rule as separate elements in the API with a value of PRSTD would do what you are trying to achieve.

 

 

 

I have not investigated this further yet but this is my first thoughts until digging into the issue.


Forum|alt.badge.img+12
  • Superhero (Employee)
  • November 28, 2022

I don’t see pm_charge_rule and um_charge_rule in the API


bskallerud
Hero (Customer)
Forum|alt.badge.img+12
  • Author
  • Hero (Customer)
  • November 29, 2022

Hi Phil

I meant PRSTD.

 

Here’s the API:

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes" initiator="import" xmlns="http://astea.com.schema.bc.CustomerContract"><session email="" alias=""><state bc_name="CustomerContract" use_cache_refresh="False"><action name="data"><main lock="false"><row number="1"><cconth_id dtype="string"><![CDATA[PW5529]]></cconth_id><cplan_id dtype="string"><![CDATA[COV001]]></cplan_id><currency_id dtype="string"><![CDATA[DKK]]></currency_id><company_id dtype="string"><![CDATA[603450]]></company_id><descr dtype="string"><![CDATA[Pure Water]]></descr><fr_date dtype="date"><![CDATA[2021-04-01T00:00:00]]></fr_date><node_id dtype="string"><![CDATA[20]]></node_id><rb_ccont_price_typ dtype="string"><![CDATA[L]]></rb_ccont_price_typ><service_level_id dtype="string"><![CDATA[SL03]]></service_level_id><pbook_code_id dtype="string"><![CDATA[Main]]></pbook_code_id><to_date dtype="date"><![CDATA[2022-12-31T00:00:00]]></to_date><prule_id dtype="string"><![CDATA[1]]></prule_id></row></main></action></state></session></root>
LeftToProcess:
<root xmlns:dt="urn:schemas-microsoft-com:datatypes"><session email="" alias=""><state bc_name="CustomerContract"><action name="data" xmlns="http://astea.com.schema.bc.CustomerContract"><main lock="false"><row number="1"><cconth_id dtype="string"><![CDATA[PW5529]]></cconth_id><cplan_id dtype="string"><![CDATA[COV001]]></cplan_id><currency_id dtype="string"><![CDATA[DKK]]></currency_id><company_id dtype="string"><![CDATA[603450]]></company_id><descr dtype="string"><![CDATA[Pure Water]]></descr><fr_date dtype="date"><![CDATA[2021-04-01T00:00:00]]></fr_date><node_id dtype="string"><![CDATA[20]]></node_id><rb_ccont_price_typ dtype="string"><![CDATA[L]]></rb_ccont_price_typ><service_level_id dtype="string"><![CDATA[SL03]]></service_level_id><pbook_code_id dtype="string"><![CDATA[Main]]></pbook_code_id><to_date dtype="date"><![CDATA[2022-12-31T00:00:00]]></to_date><prule_id dtype="string"><![CDATA[1]]></prule_id></row></main></action></state></session></root>


bskallerud
Hero (Customer)
Forum|alt.badge.img+12
  • Author
  • Hero (Customer)
  • November 29, 2022

This works:

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes" initiator="import" xmlns="http://astea.com.schema.bc.CustomerContract">
<session email="" alias="">
<state bc_name="CustomerContract" use_cache_refresh="False">
<action name="data">
<main lock="false">
<row number="1">
<cconth_id dtype="string"><![CDATA[PW5529-1]]></cconth_id>
<cplan_id dtype="string"><![CDATA[COV001]]></cplan_id>
<currency_id dtype="string"><![CDATA[DKK]]></currency_id>
<company_id dtype="string"><![CDATA[603450]]></company_id>
<descr dtype="string"><![CDATA[Pure Water]]></descr>
<fr_date dtype="date"><![CDATA[2021-04-01T00:00:00]]></fr_date>
<node_id dtype="string"><![CDATA[20]]></node_id>
<rb_ccont_price_typ dtype="string"><![CDATA[L]]></rb_ccont_price_typ>
<service_level_id dtype="string"><![CDATA[SL03]]></service_level_id>
<pbook_code_id dtype="string"><![CDATA[Main]]></pbook_code_id>
<to_date dtype="date"><![CDATA[2022-12-31T00:00:00]]></to_date>
<pm_charge_rule dtype="string"><![CDATA[PRSTD]]></pm_charge_rule>
</row>
</main>
</action>
</state>
</session>
</root>


Phil Seifert
Ultimate Hero (Employee)
Forum|alt.badge.img+24
  • Ultimate Hero (Employee)
  • November 29, 2022

Hi Bjørn,

Ok, what Joshua was suggesting was to add the um and pm charge rules to the API.

<root xmlns:dt="urn:schemas-microsoft-com:datatypes" initiator="import" xmlns="http://astea.com.schema.bc.CustomerContract">
    <session email="" alias="">
        <state bc_name="CustomerContract" use_cache_refresh="False">
            <action name="data">
                <main lock="false">
                    <row number="1">
                        <cconth_id dtype="string"><![CDATA[PW5529]]></cconth_id>
                        <cplan_id dtype="string"><![CDATA[COV001]]></cplan_id>
                        <currency_id dtype="string"><![CDATA[DKK]]></currency_id>
                        <company_id dtype="string"><![CDATA[603450]]></company_id>
                        <descr dtype="string"><![CDATA[Pure Water]]></descr>
                        <fr_date dtype="date"><![CDATA[2021-04-01T00:00:00]]></fr_date>
                        <node_id dtype="string"><![CDATA[20]]></node_id>
                        <rb_ccont_price_typ dtype="string"><![CDATA[L]]></rb_ccont_price_typ>
                        <service_level_id dtype="string"><![CDATA[SL03]]></service_level_id>
                        <pbook_code_id dtype="string"><![CDATA[Main]]></pbook_code_id>
                        <to_date dtype="date"><![CDATA[2022-12-31T00:00:00]]></to_date>
                        <prule_id dtype="string"><![CDATA[1]]></prule_id>
                        <um_charge_rule>  </um_charge_rule>
                        <pm_charge_rule>  </pm_charge_rule>

                    </row>
                </main>
            </action>
        </state>
    </session>
</root>

However, I understand your point that these two values should be created by the PRSTD that was supplied in the prule_id in your API like it did in v15.2.  This value was PRSTD in your load file. So the question really becomes how to ensure that a new prule table row is created from the parent prule id.

Just clarifying the scope of the problem you are encountering.  In your example that works above (we seem to have crossed posts while I was composing this one), please check that it created a new row for you in the prule table and not just referring it back to the original parent prule.


bskallerud
Hero (Customer)
Forum|alt.badge.img+12
  • Author
  • Hero (Customer)
  • November 29, 2022

Thanks, Phil and Joshua

We have rolled back to scratch for Customer Contracts, and now it works. And we are happy to leave it at that.

 

You both deserve a Best answer