Account Management Process
Overview
PharmX streamlines the dynamic management of accounts through the GatewayInterfaceManagement endpoint. This endpoint encompasses methods that enable the creation, approval, rejection, and reconciliation of accounts between pharmacies (Point of Sale systems) and suppliers. Automation of these account management processes eliminates the necessity for manual intervention by pharmacists or POS vendors, significantly reducing the complexity and time required for setting up and syncing accounts in PharmX and POS systems.
Account management within PharmX has three primary processes: account creation, account deletion/de-activation, and account reconciliation. This automation not only enhances operational efficiency but also ensures a seamless integration between pharmacies and suppliers.
Key Endpoints
InitiateAccountTransaction: Initiates an account creation or request.
ListAccountChangesPending: Lists accounts pending approval or rejection.
CommitAccountTransaction: Finalizes the account creation or approval process.
ListAccounts: Provides a list of active and inactive accounts.
UndoAccountAction: Cancels account creation requests or acknowledges rejected account creation requests.
Account Creation Scenarios
Scenario 1: Pharmacy Adds a Supplier Account
Process Flow
POS Initiates Creation: The POS system calls InitiateAccountTransaction with
ChangeAction
set to1
(Create) to add a supplier account.Approval Process: The supplier approves or rejects the account creation from the PharmX Portal.
Handling Rejections:
Rejected accounts are retrieved by querying ListAccountChangesPending, filtering for
AccountSetup
entries withWithVendor
set totrue
,ChangeAction
set to1
, andChangeStatus
set toRejected
.These accounts must be acknowledged via UndoAccountAction with the provided
AccountSetupId
in order to be removed from future requests.
Cancel Account Creation:
Pending account creation requests may be cancelled by calling the UndoAccountAction endpoint. The
AccountSetup
entry must haveWithSupplier
set totrue
,ChangeAction
set to1
, andChangeStatus
set toPending
.
Scenario 2: Pharmacy Requests an Account from a New Supplier
Process Flow
POS Initiates Request: The POS calls InitiateAccountTransaction with
ChangeAction
set to5
(Request) without an account number.Approval Process: The supplier approves the account request, adding the Account Number, or rejects the request, from the PharmX Portal.
Handling Rejections:
Rejected accounts are retrieved by querying ListAccountChangesPending, filtering for
AccountSetup
entries withWithVendor
set totrue
,ChangeAction
set to1
, andChangeStatus
set toRejected
.These accounts must be acknowledged via UndoAccountAction with the provided
AccountSetupId
in order to be removed from future requests.
Cancel Account Request:
Pending account requests may be cancelled by calling the UndoAccountAction endpoint. The
AccountSetup
entry must haveWithSupplier
set totrue
,ChangeAction
set to5
, andChangeStatus
set toPending
.
Scenario 3: Supplier Creates an Account
Process Flow
Supplier Initiates: An account request is initiated in the PharmX Portal by the supplier.
Handling Pending Requests:
Accounts pending approval are retrieved by querying ListAccountChangesPending, filtering for
AccountSetup
entries withWithVendor
set totrue
,ChangeAction
set to1
, andChangeStatus
set toPending
.These accounts must be approved via CommitAccountTransaction with the provided
AccountSetupId
.
Account Deletion Scenarios
Scenario 1: Pharmacy Deletes an Account
Process Flow
POS Initiates Deletion: The POS system calls InitiateAccountTransaction with
ChangeAction
set to3
(Delete) to request a supplier account to be deleted.While an account deletion is pending, it will still be returned in ListAccounts.
Approval Process: The supplier approves or rejects the account deletion from the PharmX Portal.
Handling Rejections:
Rejected accounts are retrieved by querying ListAccountChangesPending, filtering for
AccountSetup
entries withWithVendor
set totrue
,ChangeAction
set to3
, andChangeStatus
set toRejected
.These accounts must be acknowledged via UndoAccountAction with the provided
AccountSetupId
in order to be removed from future requests.
Scenario 2: Supplier Deletes an Account
Process Flow
Supplier Initiates Deletion: The supplier deletes an account from the PharmX Portal.
The account will be de-activated (soft-deleted) in PharmX.
Handling Deletions: Following the Account Reconciliation process, the account will return with
Active
flag astrue
and an empty list ofAccountRoles
.
Account Reconciliation
Regardless of the scenario used for creating an account, approved accounts will need to be reconciled against POS Accounts.
Process Flow
Retrieve PharmX accounts: Approved accounts appear in the ListAccounts endpoint.
Reconcile Accounts: Perform hourly bi-directional reconciliation against the POS accounts by
AccountNumber
to create, update, and delete/deactivate accordingly.
Deleted accounts will no longer be returned in the ListAccounts response.
If a supplier unapproves an account, the Active
property in the AccountDetail
will be false
.