HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions

Discussions

Ask a Question
Back to All

Dues Join through C# SOA

I've taken a look at the example here: https://developer.imis.com/docs/dues

And tried to adapt it to our system, substituting in the proper product codes, etc. The products are found, and the order line is added to the cart properly... all except the pricing data.

When I inspect the order line, there is no amount due. Not on the cart total, nor on the order line or child order line. The user I'm testing with is not a member, so that doesn't seem to be the issue.

I've checked directly by doing a query against the PartyItemPrice entity as well, only to draw the same results. The product pricing works fine on the normal Rise site, just not through the API.

Any thoughts on what might be going awry? Code below:

        var findResultsData =
          entities.Find(
          new QueryData(ItemData.EntityTypeName)
          .AddCriteria(new CriteriaData("ItemCode",
                                        OperationData.Equal, "JOIN_NOW_NONMEMBER"))).Result;

        ItemData item = findResultsData[0] as ItemData; //returns no price

        QueryData query = new QueryData("PartyItemPrice");
        query.AddCriteria(CriteriaData.Equal("ItemId", "JOIN_NOW_NONMEMBER"));
        query.AddCriteria(CriteriaData.Equal("PartyId", "632389"));

        var findPrice = entities.Find(query).Result; //returns no price

        QueryData query2 = new QueryData("PartyItemPrice");
        query.AddCriteria(CriteriaData.Equal("ItemId", "JOIN_NOW_NONMEMBER/DUES"));
        query.AddCriteria(CriteriaData.Equal("PartyId", "632389"));

        var findPrice2 = entities.Find(query).Result; //returns no price

        Dictionary<string, int> quantities = new Dictionary<string, int>
          {
            {"JOIN_NOW_NONMEMBER/DUES", 1},
          };
        
        var orderLineData = ConstructOrderLine(item, quantities);

Contact us
Copyright © Advanced Solutions International, All rights reserved.