Getting started with TMS FNC Cloud MailChimp Marketing
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
- TMS FNC Cloud Pack installed.
- A Mailchimp account and an API key generated in your account settings.
Add the component
- Drop
TTMSFNCCloudMailChimpMarketingonto a form or create it in code. - Assign your Mailchimp API key to
APIKey(the-usXXsuffix selects the data center). - Wire
OnError, then call an operation such asGetLists— there is no separate OAuth/connect step.
The minimal sequence — set the key, handle errors, and request the audiences:
procedure TForm1.ConnectMailChimp(const AKey: string);
begin
FMailChimp := TTMSFNCCloudMailChimpMarketing.Create(Self);
// The API key from your Mailchimp account. Its trailing -usXX suffix selects
// the data center, so no separate server URL is needed.
FMailChimp.APIKey := AKey;
FMailChimp.OnError := MailChimpError;
FMailChimp.OnGetLists := MailChimpGetLists;
// No OAuth/Connect step: just call an operation. Result arrives in OnGetLists.
FMailChimp.GetLists(100, False);
end;
procedure TForm1.MailChimpError(Sender: TObject; AErrorMessage: string);
begin
// Every failed request reports here, separate from the success events.
ShowMessage('Mailchimp error: ' + AErrorMessage);
end;
Next steps
- Guides — connecting, audiences, members, and campaigns.
- API reference — full class reference.