<PAGE>
 
                                                                    EXHIBIT 10.1
                                                                                
                              CONSULTING AGREEMENT
                              --------------------
                                        

        This Consulting Agreement, dated as of January 5, 1998, by and between
Dendrite International, Inc., a New Jersey corporation maintaining its principal
offices at 1200 Mount Kemble Avenue, Morristown, New Jersey 07960 ("Dendrite"),
and Edward Kfoury, an individual residing at 1272 Isabel Drive, Sanibel Island,
Florida 33957 ("Consultant").

                                   WITNESSETH
                                   ----------
                                        
        WHEREAS, Dendrite, together with its affiliates, is the developer and
exclusive owner of certain computer software programs for Electronic Territory
Management Systems and related matters known as the Dendrite System (such
computer programs, together with any copyrights and/or trade secrets
incorporated into such programs, shall be hereinafter referred to as the
"Dendrite System");

        WHEREAS, Consultant is a consultant who provides business advice to
computer software and services companies; and

        WHEREAS, the parties have agreed to establish a business relationship in
which Consultant will provide certain defined services to Dendrite upon the
terms and conditions specified herein.

        NOW, THEREFORE, in consideration of the above premises and the mutual
promises and covenants contained herein, the parties agree as follows:

1.  SCOPE OF SERVICES
    -----------------

    (a)  Dendrite hereby engages Consultant, and Consultant accepts such
         engagement, to provide the following services to Dendrite:

             (i)    advice regarding the conduct of business by Dendrite in
                    Japan;
             (ii)   advice concerning the implementation of certain business
                    processes within Dendrite;
             (iii)  advice regarding the adoption and implementation of a
                    technology strategy by Dendrite; and
             (iv)   such other services as may be mutually agreed upon from time
                    to time by Consultant and the President and Chief Executive
                    Officer of Dendrite.

The foregoing services to be provided by Consultant are hereinafter referred to
as the "Services."

    (b)  Consultant shall use his reasonable commercial efforts in
performing the Services according to the timetables, milestones and all other
requirements as may be mutually determined from time to time by Consultant and
the President and Chief Executive Officer of Dendrite.  Consultant warrants that
all Services shall be performed in compliance with all applicable law.

    (c)  Consultant shall perform the Services at Dendrite facilities or such
other locations as are mutually acceptable to the parties.

2.  COMPENSATION AND EXPENSES
    -------------------------

    (a) Dendrite agrees that Consultant's sole compensation for the performance
of the Services shall be a grant under Dendrite's 1997 Stock Incentive Plan of
options to purchase 12,000 shares of Dendrite's common stock.

    (b) In addition to the fee specified above, Dendrite will reimburse
Consultant for his reasonable travel and business expenses (over and above
relocation expenses and the normal daily working and commuting expenses which
are the responsibility of Consultant) related to any business travel or
expenditure specifically requested by Dendrite.  Such expenses must be
authorized in advance by Dendrite.  Actual out-of-pocket expenses incurred shall
be reimbursed within thirty (30) days after receipt of invoices or receipts
submitted by Consultant.
<PAGE>
 
3.  TERM OF AGREEMENT
    -----------------

    This Agreement shall become effective as of January 5, 1998 and continue
until January 5, 2001 unless earlier terminated by either party upon two (2)
weeks prior written notice to the other party.

4.  CONSULTANT'S REPRESENTATIONS AND CERTAIN OBLIGATIONS
    ----------------------------------------------------

    (a) Consultant represents and warrants to Dendrite that he is not now nor
shall be a party to any other agreement or under any obligation to or
restriction by any third party which would prevent Consultant from entering into
this Agreement or which would adversely affect the performance by him of the
Services or any of the other undertakings set forth herein.

    (b) Consultant agrees to keep records and books of account for Dendrite in
accordance with United States generally accepted accounting principles and
practices in its industry, which records and books of account shall be subject
to audit by Dendrite. Dendrite shall, at all reasonable times, have access to
such books and records and Consultant shall preserve such books and records for
a period of two (2) years after termination of the Agreement.

5.  CONFIDENTIALITY; RETURN OF DATA
    -------------------------------

    (a) Consultant shall hold confidential and shall not, directly or
indirectly, disclose, publish, or use for the benefit of itself or any third
party, any "Confidential Information" of Dendrite, without first having obtained
Dendrite's written consent to such disclosure or use. "Confidential Information"
shall mean any and all information disclosed to, or otherwise acquired or
observed by, Consultant from Dendrite, relating to the Dendrite System and/or
the business of Dendrite. The term "Confidential Information" does not include
information which (i) becomes generally available to the public other than as a
result of disclosure by Consultant in breach of this Agreement, (ii) was
available to Consultant on a non-confidential basis as shown in written records
prior to its disclosure to Consultant by Dendrite or (iii) becomes available to
Consultant on a non-confidential basis from a source other than the Company;
provided that such source is not bound by a confidentiality agreement with the
Company or is otherwise prohibited from transferring the information to
Consultant by a contractual, legal or fiduciary obligation.

    (b) In the event that Consultant is requested or required (by oral
questions, interrogatories, requests for information or documents, subpoena,
civil investigative demand or similar process) to disclose any of the
Confidential Information, it is agreed that Consultant will provide Dendrite
with prompt notice of such request(s) so that Dendrite may seek an appropriate
protective order or other appropriate remedy and/or waive compliance with the
confidentiality provisions of this Agreement. In the event that such protective
order or other remedy is not obtained, or Dendrite grants a waiver hereunder,
Consultant may furnish that portion (and only that portion) of the Confidential
Information which Consultant is legally compelled to disclose and shall use
reasonable commercial efforts to obtain reliable assurance that confidential
treatment will be accorded any Confidential Information so furnished.

    (d) Promptly following the written request of Dendrite, Consultant will
deliver to Dendrite all documents or other matter furnished by Dendrite to
Consultant constituting Confidential Information, together with all copies
thereof.  In the event of such request, all other documents or other matter
constituting Confidential Information, together with all copies thereof in the
possession of Consultant, will be destroyed with any such destruction confirmed
by Consultant in writing to Dendrite.

The provisions of this Article 5, CONFIDENTIALITY; RETURN OF DATA, shall survive
the termination or expiration of this Agreement.

6.  INDEPENDENT CONTRACTOR
    ----------------------

    (a) Consultant is retained by Dendrite solely for the purposes and to the
extent set forth in this Agreement, and Consultant's relationship to Dendrite
shall, during the period of his rendering of the Services hereunder, be that of
an independent contractor.  Consultant shall be solely responsible for the
timely withholding, reporting and payment to the proper authorities of all taxes
incurred in connection with the performance of the Services.  Consultant further
agrees to indemnify, defend and hold Dendrite harmless against all claims and
taxes (including interest, penalties, and any other costs) which are claimed or
assessed against Dendrite and are attributable to acts or omissions arising out
of the 
<PAGE>
 
Agreement or the payments made hereunder. The provisions of this paragraph (a)
shall survive the termination or expiration of this Agreement.

    (b) Dendrite shall not withhold from any fee or other payments made to the
Consultant any deductions for income taxes, employment taxes or other items, nor
make any premium payments or contributions for any worker's compensation or
unemployment compensation for the benefit of Consultant.  Consultant expressly
agrees that he will not be entitled by virtue of the Agreement to participate in
or to have any employee status under any employment-related right, benefit, plan
or program of any form or nature whatsoever available to Dendrite's employees,
and that Consultant hereby unconditionally and irrevocably waives and releases
all rights to any such participation. The provisions of this paragraph (b) shall
survive the expiration or termination of this Agreement.

    (c) Consultant agrees that no liability shall accrue in favor of Consultant
as against any officer, director, agent or employee of Dendrite, but it will
look solely to the assets of Dendrite for satisfaction of this Agreement.
Consultant shall, at Consultant's expense, indemnify, defend and hold Dendrite
harmless against all claims, liabilities, and expenses (including reasonable
attorneys' fees and expenses) for bodily injury, death or property damage which
are in any way connected with the performance of the Services, or the acts or
omissions of Consultant.  For the purposes of this article, the term "Dendrite"
shall be deemed to include Dendrite's officers, directors, agents, employees,
affiliates, and all those claiming any interest in the project to which the
Services relates.  The provisions of this paragraph (c) shall survive the
expiration or termination of the Agreement.

7.  NOTICES
    -------

    Any notice required or permitted to be given hereunder shall be in writing
and shall be either (i) delivered personally by hand, (ii) sent by registered or
certified mail, return receipt requested, or (iii) sent by a recognized
qualified overnight delivery service (e.g., Federal Express).  All such notices
                                      ----                                     
shall be sent to the addresses of each party set forth below in the first
paragraph of this Agreement or to such other address or addresses as shall be
designated in writing in the same manner.

    All notices shall be deemed to have been given when received.

8.  MISCELLANEOUS PROVISIONS
    ------------------------

    (a) Consultant acknowledges that money damages would be both incalculable
and an insufficient remedy for any breach of this agreement by Consultant and
that any such breach would cause Dendrite irreparable harm.  Accordingly,
Consultant also agrees that, in the event of any breach or threatened breach of
this Agreement, Dendrite, in addition to any other remedies at law or in equity
it may have, shall be entitled, without the requirement of posting a bond or
other security, to equitable relief, including injunctive relief and specific
performance.
 
    (b) This Agreement shall be governed by and interpreted in accordance with
the laws of the State of New Jersey applicable to agreements entered into and
performed wholly within the State of New Jersey, and without regard to its
conflict of law principles.

    (c) All disputes arising out of or in connection with this Agreement shall
be solely and exclusively resolved by a court of competent jurisdiction in the
State of New Jersey.  Consultant expressly consents to the jurisdiction of the
courts of the State of New Jersey and the Federal District Court for the
District of New Jersey, and waives any objections or right as to the forum non
conviens, lack of personal jurisdiction or similar grounds with respect to any
dispute relating to this Agreement.

    (d) This Agreement may not be and shall not be deemed or construed to have
been modified, amended, rescinded or canceled in whole or in part, except by
written instrument signed by the parties hereto which makes specific reference
to this Agreement and which specifies that this Agreement is being modified,
amended, rescinded or canceled.

    (e) If any provision of this Agreement shall be declared invalid or illegal
for any reason whatsoever, then notwithstanding such invalidity or illegality,
the remaining terms and provisions of this Agreement shall remain in full force
and effect in the same manner as if the invalid or illegal provision had not
been contained herein.

    (f) No failure on the part of either party to exercise, and no delay in
exercising, any right or remedy hereunder shall operate as a waiver thereof, nor
shall any single or partial exercise of any right or remedy hereunder preclude
any other or a future exercise thereof or the exercise of any other right or
remedy granted hereby, or by any related 
<PAGE>
 
document, or by law. Any failure of a party to comply with any obligation
contained in this Agreement may be waived by the party entitled to the benefit
thereof only by a written instrument duly executed and delivered by the party
granting such waiver, which instrument makes specific reference to this
Agreement and the provision to which it relates and describes the right or
obligation consented to, waived or purported to be violated.

    (g) This Agreement contains the entire agreement and understanding between
the parties hereto in reference to the subject matter hereof and supersedes all
other prior agreements and understandings, both written and oral, between the
parties with respect to the subject matter hereof.

    (h) This Agreement is personal in nature and Consultant shall not, without
the written consent of Dendrite, assign or transfer this Agreement or any rights
or obligations hereunder, whether by operation of law or otherwise.

    IN WITNESS WHEREOF, the undersigned parties have executed this Agreement as
of the date first above written.

                           DENDRITE INTERNATIONAL, INC.


                           By:  /s/ Christopher J. French
                                -------------------------
                           Name:  Christopher J. French
                           Title:  Vice President, General Counsel


                           /s/ Edward Kfoury
                           -----------------
                           Edward Kfoury