|
Fixed Trigger - Update
Allows to update an existing Trigger.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.5 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_api_key |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
type |
|
manage_campaign_triggers |
|
Required |
|
|
|
action |
|
update |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
trigger_id |
|
208 |
|
Required |
|
|
|
trigger_name |
|
Get $10 for each 1000 points earned |
|
Required |
|
|
|
trigger_type |
|
A |
|
Required See Notes |
|
|
|
trigger_campaign_id_from |
|
1234567890123456 |
|
Required See Notes |
|
|
|
trigger_buyx_from_item_description |
|
Coffee |
|
Optional See Notes |
|
|
|
trigger_threshold_amount |
|
1000 |
|
Required See Notes |
|
|
|
trigger_apply_to_all_transactions |
|
Y or N |
|
Optional See Notes |
|
|
|
trigger_deduct_from_balance |
|
Y or N |
|
Optional See Notes |
|
|
|
trigger_deduct_from_balance_repeat |
|
Y or N |
|
Optional See Notes |
|
|
|
trigger_action_type |
|
add or multiply |
|
Required See Notes |
|
|
|
trigger_action_amount |
|
10 |
|
Required |
|
|
|
trigger_action_rule |
|
A or B |
|
Optional See Notes |
|
|
|
trigger_campaing_id_to |
|
5555554567890123456 |
|
Required See Notes |
|
|
|
trigger_buyx_to_item_description |
|
Dessert |
|
Optional See Notes |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Notes:
- Trigger Types: A= Fixed (does not have an expiration date), B= Temporary (active only for a certain period of time), and C = Recurring (active only during certain days/hours)
- Campaign ID from is the Campaign ID where the trigger is originated from. For example, if your trigger is Get $10 in your Gift Card Account for each 1000 points that you earn, your campaign_id_from will be the ID of the Points Campaign where you are tracking the points that customers are earning.
- Trigger buyx from item description is applicable only if the trigger_campaing_id_from is a campaign type Buy X Get 1 Free. For example: If your trigger is Buy 9 Coffees Get automatically a Free Dessert, "Coffee" will be the buyx item description.
- Trigger amount is the threshold value that customers have to meet for the trigger to get executed. Example: Get $10 in your Gift Card Account for each 1000 points trigger, the trigger_amount will be 1000.
- Trigger apply to all transactions is an option to apply the trigger action to all transactions received. Example: Get $0.25 in your Gift Card Account each time you earn points.
- Trigger deduct from balance allows to deduct from the customer balance the threshold amount. Example: in the Get $10 in your Gift Card Account for each 1000 points trigger, the 1000 points will be deducted from the customer points balance.
- Trigger deduct from balance repeat allows to keep deducting the threshold amount as long as there is enough balance available. Use N (No) to deduct it only once.
- Trigger threshold amount is the value that will be added to the customer account as a result of the trigger.
- Trigger action type can be: "add" (to add a value to the customer account as a result of the trigger) or "multiply" (to multiply the transaction amount (trigger threshold) by a set number in order to determine the value that will be added to the customer account as a result of the trigger).
- Include trigger_action_rule only if any of the two types are applicable. A= trigger_include_transaction_amount (to add the transaction amount (monetary or points) to the value that will be added to the customer account as a result of the trigger) and B=trigger_apply_to_points_earned (applies the action amount to the points earned in a transaction instead of the value of the monetary transaction).
- Trigger campaing id to is the campaign where the trigger value will be added to. Example: in the Get $10 in your Gift Card Account for each 1000 points trigger it will be the Gift Card Campaign.
- Trigger buyx to item description is used only when the trigger is configured for a Buy X Get 1 Free campaign. The item description is the name of the buyx item (or items) used as rewards (result of the trigger). If multiple items will be added as a result of the trigger use commas to separate each item.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['account_id'] = 'greatwidgets';
- $data['type'] = 'manage_campaign_triggers';
- $data['action'] = 'update';
- $data['trigger_id'] = '208'
- $data['trigger_campaing_id_from'] = '5095775700340492'
- $data['trigger_type'] = 'A'
- $data['trigger_threshold_amount'] = '1000';
- $data['trigger_apply_to_all_transactions'] = 'N';
- $data['trigger_deduct_from_balance'] = 'Y';
- $data['trigger_deduct_from_balance_repeat'] = 'Y';
- $data['trigger_action_type'] = 'add';
- $data['trigger_action_amount'] = '10';
- $data['trigger_campaing_id_to'] = '6017673775945338';
- $data['trigger_name'] = 'Get $10 for each 1000 points earned';
Success XML Response:
- <response status="success">
- <trigger_id>208</trigger_id>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|