# CreateMarketingTriggers

#### Description

Marketing triggers are used to track any activity of the contact / public user, which have some meaning in your company sales or marketing process.

#### Fields Description

<table border="1" id="bkmrk-field-name-example-d" style="border-collapse: collapse; width: 100%; height: 261px;"><tbody><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">**Field name**</td><td style="width: 33.333333333333336%; height: 29px;">**Example**</td><td style="width: 33.333333333333336%; height: 29px;">**Description**</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">baseType</td><td style="width: 33.333333333333336%; height: 29px;">new-phone-number

url-visit

goal-achieved

mail-url-visit

mail-open

url-visit

unsubscribe

</td><td style="width: 33.333333333333336%; height: 29px;">Text identification of the marketing trigger (what actually happened)</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">contextId</td><td style="width: 33.333333333333336%; height: 29px;">123456789000</td><td style="width: 33.333333333333336%; height: 29px;">Identification of Folder ID, Project ID or Activity ID in Atollon's context structure. It is necessary to enter context ID in case it should be displayed in context Timeline.</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">contactId</td><td style="width: 33.333333333333336%; height: 29px;">113456789000</td><td style="width: 33.333333333333336%; height: 29px;">Identification of contact, who caused the trigger</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">url</td><td style="width: 33.333333333333336%; height: 29px;">https://yourcompany.atollon.com/pub/23423432</td><td style="width: 33.333333333333336%; height: 29px;">Page that the contact visited (optional)</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">trackingCode</td><td style="width: 33.333333333333336%; height: 29px;">yourSuperCampaignXYZ</td><td style="width: 33.333333333333336%; height: 29px;">Any text string representing one particular campaign / marketing activity / message template</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">description</td><td style="width: 33.333333333333336%; height: 29px;">Contact visited URL</td><td style="width: 33.333333333333336%; height: 29px;">Any descriptive text that will be visible to Atollon users in Timeline</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">triggerDate</td><td style="width: 33.333333333333336%; height: 29px;">2020-08-12 12:00</td><td style="width: 33.333333333333336%; height: 29px;">When the trigger happened?</td></tr><tr style="height: 29px;"><td style="width: 33.333333333333336%; height: 29px;">numberOfVisits</td><td style="width: 33.333333333333336%; height: 29px;">45</td><td style="width: 33.333333333333336%; height: 29px;">In case the target user is super active (or robot), we may want to avoid spamming Atollon with unnecessary records and aggregate page visits</td></tr></tbody></table>

The example below notifies Atollon about new phone number added to contact. Atollon may therefore create call task.

#### Example Request

```XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <wsdl:CreateMarketingTriggers>
         <server>acme</server>
         <session>61A...DBD04</session>
         <MARKETING_TRIGGER>
            <baseType>new-phone-number</baseType>
            <contextId>132716101</contextId>
            <contactId>139663101</contactId>
            <url>www.yourcompany.com/product/page</url>
            <trackingCode>www.company.com/product/page</trackingCode>
            <description>Extranet user added new phone number</description>
            <triggerDate>2020-07-31 12:00</triggerDate>
            <numberOfVisits>1</numberOfVisits>
         </MARKETING_TRIGGER>
      </wsdl:CreateMarketingTriggers>
   </soapenv:Body>
</soapenv:Envelope>
```

#### Example Response

```XML
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
   <ns0:Body>
      <ns1:CreateMarketingTriggersResponse>
         <result>OK</result>
         <time>0.22972488</time>
         <newId>400097101</newId>
      </ns1:CreateMarketingTriggersResponse>
   </ns0:Body>
</ns0:Envelope>
```

#### WSDL Listing

**web.wsdl**