Skip to main content
Skip table of contents

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

Account Creation Scenarios

Scenario 1: Pharmacy Adds a Supplier Account

Process Flow

  1. POS Initiates Creation: The POS system calls InitiateAccountTransaction with ChangeAction set to 1 (Create) to add a supplier account.

  2. Approval Process: The supplier approves or rejects the account creation from the PharmX Portal.

  3. Handling Rejections:

    • Rejected accounts are retrieved by querying ListAccountChangesPending, filtering for AccountSetup entries with WithVendor set to true, ChangeAction set to 1, and ChangeStatus set to Rejected.

    • These accounts must be acknowledged via UndoAccountAction with the provided AccountSetupId in order to be removed from future requests.

  4. Cancel Account Creation:

    • Pending account creation requests may be cancelled by calling the UndoAccountAction endpoint. The AccountSetup entry must have WithSupplier set to true, ChangeAction set to 1, and ChangeStatus set to Pending.

Scenario 2: Pharmacy Requests an Account from a New Supplier

Process Flow

  1. POS Initiates Request: The POS calls InitiateAccountTransaction with ChangeAction set to 5 (Request) without an account number.

  2. Approval Process: The supplier approves the account request, adding the Account Number, or rejects the request, from the PharmX Portal.

  3. Handling Rejections:

    • Rejected accounts are retrieved by querying ListAccountChangesPending, filtering for AccountSetup entries with WithVendor set to true, ChangeAction set to 1, and ChangeStatus set to Rejected.

    • These accounts must be acknowledged via UndoAccountAction with the provided AccountSetupId in order to be removed from future requests.

  4. Cancel Account Request:

    • Pending account requests may be cancelled by calling the UndoAccountAction endpoint. The AccountSetup entry must have WithSupplier set to true, ChangeAction set to 5, and ChangeStatus set to Pending.

Scenario 3: Supplier Creates an Account

Process Flow

  1. Supplier Initiates: An account request is initiated in the PharmX Portal by the supplier.

  2. Handling Pending Requests:

    • Accounts pending approval are retrieved by querying ListAccountChangesPending, filtering for AccountSetup entries with WithVendor set to true, ChangeAction set to 1, and ChangeStatus set to Pending.

    • These accounts must be approved via CommitAccountTransaction with the provided AccountSetupId.

Account Deletion Scenarios

Scenario 1: Pharmacy Deletes an Account

Process Flow

  1. POS Initiates Deletion: The POS system calls InitiateAccountTransaction with ChangeAction set to 3 (Delete) to request a supplier account to be deleted.

    • While an account deletion is pending, it will still be returned in ListAccounts.

  2. Approval Process: The supplier approves or rejects the account deletion from the PharmX Portal.

  3. Handling Rejections:

    • Rejected accounts are retrieved by querying ListAccountChangesPending, filtering for AccountSetup entries with WithVendor set to true, ChangeAction set to 3, and ChangeStatus set to Rejected.

    • 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

  1. Supplier Initiates Deletion: The supplier deletes an account from the PharmX Portal.

    • The account will be de-activated (soft-deleted) in PharmX.

  2. Handling Deletions: Following the Account Reconciliation process, the account will return with Active flag as true and an empty list of AccountRoles.

Account Reconciliation

Regardless of the scenario used for creating an account, approved accounts will need to be reconciled against POS Accounts.

Process Flow

  1. Retrieve PharmX accounts: Approved accounts appear in the ListAccounts endpoint.

  2. 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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.