When I use the run mail merge button on the gift screen,Why it pulls all the gifts for that account and not just on the gift the button is on.

What’s happening is that the merge button was generated as a “Home page component”, not a Detail page button. When a button is created for the Home page, Apsona does not receive the specific Gift (Opportunity/Donation) record ID you’re viewing. As a result, it runs the merge against the entire data source (which is why you’re seeing all gifts for the account).

Why it pulls all gifts:

  • Home page component → no record context → Apsona merges all matching records

  • Detail page button → passes the current Gift record ID → Apsona merges only that gift

How to fix it:

You’ll need to regenerate the button code with the correct usage setting and replace the existing button code in Salesforce.

Step 1: Regenerate the button code in Apsona

  1. Go to Apsona → Settings → Merge actions

  2. Open the merge action used by your button

  3. Click Make Button

  4. In “This button will be used in”, select
    Detail page for [your Gift object]
    (for example: Detail page for Opportunity)

  5. Click Generate and copy the new code

Step 2: Update the Salesforce button

  1. Go to Salesforce Setup → Object Manager

  2. Open your Gift / Opportunity object

  3. Go to Buttons, Links, and Actions

  4. Edit the existing merge button

  5. Replace the old code with the newly generated code

  6. Save and refresh the record page

Result:

After this change:

  • Clicking the button on a Gift record will run the merge only for that specific gift

  • It will no longer pull all gifts related to the account