This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Contacts in ActiveCampaign
Overview
The following operations allow you to work with contacts. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with contacts, see Sample configuration.
Operation | Description |
---|---|
Creates a new contact. | |
getContactByEmail | Retrieves a contact by e-mail. |
Operation details
This section provides further details on the operations related to contacts .
Creating a new contact
The createContact
operation creates a new contact.
<activecampaign.createContact> <email>{$ctx:email}</email> <firstName>{$ctx:firstName}</firstName> <lastName>{$ctx:lastName}</lastName> <phone>{$ctx:phone}</phone> <orgName>{$ctx:orgName}</orgName> <tags>{$ctx:tags}</tags> <ip4>{$ctx:ip4}</ip4> <form>{$ctx:form}</form> <listDetails>{$ctx:listDetails}</listDetails> </activecampaign.createContact>
Properties
The e-mail of the new contact.email:
The first name of the contact.firstName:
The last name of the contact.lastName:
The telephone number of the contact.phone:
The organization name (if it does not exist, this will create a new organization).orgName:
Tags for this contact (comma-separated).tags:
The IP address of the contact. Default: 127.0.0.1ip4:
The optional subscription form ID to inherit those redirection settings.form:
All the details of lists this contact belongs to.listDetails:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.createContact
{ "apiUrl":"http://wso2.api-us1.com", "apiKey":"eaae213ef1b8d842aba960423308c2e516d7704b95be8899fae897a1580a40e0a5cea198", "apiOutput":"json", "email":"wso2connector123.abdera@gmail.com", "firstName":"Randika", "lastName":"Rodrigo", "phone":"+942788087", "orgName":"Virtusa", "tags":"Tag Contact", "ip4":"192.22.210.125", "form":"14", "listDetails":{ "p[1]":"1", "status[1]":"1", "noresponders[1]":"0", "sdate[1]":"2015-05-07 06:00:00", "instantresponders[1]":"0", "lastmessage[1]":"0", "field[1,0]":"Custom1 Value", "field[%CUSTOM2%,0]":"Custom2 Value" } }
Related ActiveCampaign documentation
http://www.activecampaign.com/api/example.php?call=contact_add
Retrieving a contact by e-mail
The
operation retrieves a contact by e-mail.getContactByEmail
<activecampaign.getContactByEmail> <email>{$ctx:email}</email> </activecampaign.getContactByEmail>
Properties
The e-mail address of the contact being looked up.email:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.g
etContactByEmail
{ "apiUrl":"http://wso2.api-us1.com", "apiKey":"eaae213ef1b8d842aba960423308c2e516d7704b95be8899fae897a1580a40e0a5cea198", "apiOutput":"json", "email":"wso2connector.abdera@gmail.com" }
Related ActiveCampaign documentation
http://www.activecampaign.com/api/example.php?call=contact_view_email
Sample configuration
Following is a sample proxy service that illustrates how to connect to ActiveCampaign with the init
operation and use the
operation. The sample request for this proxy can be found in the createContact sample request. You can use this sample as a template for using other operations in this category.createContact
<proxy xmlns="http://ws.apache.org/ns/synapse" name="activecampaign_createContact" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="apiOutput" expression="json-eval($.apiOutput)"/> <property name="email" expression="json-eval($.email)"/> <property name="firstName" expression="json-eval($.firstName)"/> <property name="lastName" expression="json-eval($.lastName)"/> <property name="phone" expression="json-eval($.phone)"/> <property name="orgName" expression="json-eval($.orgName)"/> <property name="tags" expression="json-eval($.tags)"/> <property name="ip4" expression="json-eval($.ip4)"/> <property name="form" expression="json-eval($.form)"/> <property name="listDetails" expression="json-eval($.listDetails)"/> <activecampaign.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <apiOutput>{$ctx:apiOutput}</apiOutput> </activecampaign.init> <activecampaign.createContact> <email>{$ctx:email}</email> <firstName>{$ctx:firstName}</firstName> <lastName>{$ctx:lastName}</lastName> <phone>{$ctx:phone}</phone> <orgName>{$ctx:orgName}</orgName> <tags>{$ctx:tags}</tags> <ip4>{$ctx:ip4}</ip4> <form>{$ctx:form}</form> <listDetails>{$ctx:listDetails}</listDetails> </activecampaign.createContact> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>