cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BA Studio: Relationship PO-License does not update current license entitlements

Hi, 

I am rather new with the Business Adapter Studio (Version 17.0.1.11), Flexnet Manager 2022 R1

Importing Purchase Orders and linking (Relationship) them with the correct license (based on Publisher) works fine with BA.

Albeit when looking into the license the current license entitlements for each PO remain at zero. Thus the overall counter (Entitlements from Purchases in the Compliance Tab) also is not updated with the newly bought entitlements. All the data come in correctly including valid Start en Expiry Dates and are "Accepted".

When I manually add the PO's thru the GUI to the license: current license entitlements is correctly updated as well as the overall counter. 

What am I overlooking in the Business Adapter programming??

Regards,

Michel.

0 Kudos
3 Replies
kclausen
Level 15 Flexeran
Level 15 Flexeran

@mstoll - The behavior that you are experiencing is expected.

If you use the following 2 methods to link a purchase to a license, the Proof of Purchase record is linked to the license, but only as a reference.  It will not be taken into account on the license for compliance in terms of showing how many purchases are owned:
1) Manually link a purchase to a license from the Purchase tab of the license
2) Link a purchase to a license with a Business Adapter

The only way to for a Purchase record to go through the Entitlement Process so that the Total Purchase count of the license is updated is when you link a Purchase to a License through the Unprocessed Purchase view in the UI.  

@kclausen  Hi,

Thanks for reaching out, it took a while to get back as I had to recheck certain features.

1. Apparently Flexera made the choice that Unprocessed Purchase View is a way to link a Purchase to a license, but also by adding it directly from the Purchases Tab in the License UI itsself. The PO added is removed then from the Unprocessed Purchase view.

2. It seems rather silly to follow either method (manually link a PO to a license) to get a relationship between Purchase Order and License as those relationships are already there by means of the Business Adapter.

Would seem more appropiate to call the necessary procedures with a Custom SQL section. And those I am looking for.

Regards,

Michel.

0 Kudos
nrousseau1
Level 8 Flexeran
Level 8 Flexeran

Hello  @mstoll ,

As Kirk describes the PO to license linkage is complex and is performed either from the License purchase tab (not recommended because it shortcuts the "licensing" logic of the Process purchase wizard) or from the wizard... because beyond creating the link, it actually creates a transaction that contains a "number allocated". Indeed, you can split the number of entitlements purchase order line between multiple licenses or between an older and new version license (upgrade license).

The solution consists in having in an Excel File (or a source) the target license name (unique), the PO line information (PO and PO line will be created on the fly) and the quantity assigned.

Using the SQL Query Object for a Business Adapter after the PO creation step, you will create the transactions (that link PO Lines to licenses) with a script like:

--Create links between licenses and PO lines only for PO Lines not already linked to avoid unique key constraint violation
INSERT INTO EntitlementTransaction
(SoftwareLicenseID, PurchaseOrderDetailID, Adjustment, OtherCandidates, EntitlementTransactionTypeID, EntitlementRecommendationStateID, IsDeferred, TransactionUser, TransactionDate, PreviousMaintenanceDefinition, PreviousMaintenanceContractID)
SELECT
CAST(LicenseId as INT),
POLineID,
pod.LicenseQuantity,
0,
1,
4,
0,
'PO Advanced Import',
GETDate(),
NULL,
NULL
FROM 'DBO'.'ECMImport_Import PO Lines' pol
INNER JOIN PurchaseOrderDetail_MT pod on pol.POLineID = pod.PurchaseOrderDetailID
WHERE LicenseID IS NOT NULL
AND pol.POLineID NOT IN (SELECT PurchaseOrderDetailID FROM EntitlementTransaction_MT)

-- For PO Lines that were already linked, just update the number of assigned entitlements to be the PO number of rights
UPDATE EntitlementTransaction
SET Adjustment = (SELECT Licenses from 'ECMImport_Import PO Lines' pol
WHERE EntitlementTransaction_MT.PurchaseOrderDetailID = pol.POLineID)
WHERE EntitlementTransaction_MT.PurchaseOrderDetailID IN (SELECT POLineID FROM 'ECMImport_Import PO Lines').

Let's discuss that tomorrow

 

POAdvancedImport.png

@mstoll

0 Kudos