Connect Contacts with Respective Campaigns & Payments

Hi Infusionsoft Gurus,

I’m trying to connect “ContactId” of various contacts to their respective Campaigns and also their Payments made, but had some questions and issues in the same.

  1. How can I connect a ContactId to a specific Campaign that they came in from? Did not find any connection to tables using Table schema - https://developer.infusionsoft.com/docs/table-schema/

  2. Regarding payments, I can use “Invoice” table to connect to the payments done, but is there a way we can know the first or last payments the contact made? Any other Invoice Tables to use here?

Let me know your thoughts/answers when free.

The campaign history will be a bit of a problem unless you don’t mind using saved searches but the payments can be gathered through the Payments table.

Hi @Pravin_Singh, here are the answers to your questions.

  1. Unfortunately we do not easily expose this data. However, there is a report that might give you what you want under Marketing > Reports > Campaign Goal Completion. After saving a report with your desired criteria, you could then use SearchService.getSavedSearchResults to programmatically retrieve the results.

  2. You may want to look into using the transactions REST endpoint. I believe it will give you the payment information you’re looking for. Please note however that there is currently a bug where failed transactions do not appear in the results of this endpoint.

    Alternatively, you can query Invoice, Payment, and/or InvoicePayment tables via XML-RPC to retrieve that information.

1 Like