Promotional Offer Email

We create a child element to the wait element we created before. This Activity Element only has one action: send promotional offer email to the customer if the customer has an email address entered.

We check if the customer has an email address by checking the condition > 0.

As for the action, it's a Send Email action with the email body below:

__VG__CUSTOMER__ is a special workflow global variable that corresponds to the customer CRM record. We can use this variable to check for customer's email length, first name, etc.

Notice the email link to the latest offer. We will have to create this webpage ourselves. We will show how to do this below.

Promotional Offer Page

Here is our promotional offer page:

It is a very simple web page with some text and a link to our offer handler page. We did not do this in our example but we want the customer to click on the link so it would be in our best interest to make the webpage look appealing and the link very visible. Once the customer clicks on the link, they're sent to our offer handler page.

Here is our offer handler page:

Update an Existing CRM Record

The offer handler contains an action that updates the existing CRM record. Voicent CRM has a web interface for updating an existing CRM record. It is similar to adding a new CRM record via web as you can see from this example in Lesson 1 Webinar Scheduling.

The code that updates an existing CRM record is below:
$params = "action=set&passwd=crmweb&name=customer_catname&value=Lead&crmcusid=" . $_GET['crmcusid'];
$ch = curl_init("localhost:8155/vxcrm.jsp?" . $params);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$rcstr = curl_exec($ch);

As you can see, we use the action "set" and password as "crmweb", which is the default password. We're updating the customer category name into "Lead". The next page will explain vxcrm.jsp and the actions more thoroughly.