Glossary: Action Types

Overview

When building a Trigger, you must define the Action that the platform takes when the trigger definition occurs. Loyalty supports a wide range of possible Actions. See below for more details on how to configure the different Action types. 

Rewards

The following Action Types relate to granting or using Rewards.

 Action Type: Award Reward

Click hereClick here

An "Award" refers to a Reward granted to a Member, without the Member having to deduct any of their points. An Award is essentially a "free" Reward (as opposed to a "Redemption," which is a Reward that a Member earns and purchases with the appropriate number of points). The "Award Reward" Action type allows you to award a Reward to a Member.  

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Award Reward

  2. From the "Reward" drop-down menu, select the desired Reward.

  3. From the "Auto Claim" drop-down menu, selct Yes to automatically set the award status to "Claimed." If you select No, the award status is "Awarded" until the Member actually claims the award. 

  4. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

Challenges

The following Action types relate to managing a Member's Challenges.

 Action Type: Grant Challenge

Click hereClick here

To grant a Challenge to a Member:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Grant Challenge

  2. From the "Challenge" drop-down menu, select the desired Challenge.

  3. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

Punch Cards

The following Action types relate to managing a Member's Punch Cards. 

 Action Type: Create Punch

Click hereClick here

To have the Trigger create a "punch" on a Member's Punch Card:  

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Create Punch

  2. From the "Punch Card Type" drop-down menu, select the desired Punch Card. 

  3. From the "Punch Mode" drop-down menu, select one of the following:

  • Punch Count: Used for Punch Cards that have a simple count of punches required to complete the Punch Card. In the "Punches" field, enter the number of punches that the Member earns per Activity, and select Static from the drop-down menu. Optionally, enter a Groovy script in the "Punches" field to calculate a number of punches earned (for example, based on number of items purchased, or on the purchase amount), and select Dynamic from the drop-down menu. 

  • Named Punches: Used for Punch Cards that have Named Punches defined. In the "Named Punches" field, enter one or more Named Punches (separated by commas) that the Member earns.

  • Punch by Value: Used for Punch Cards that have Named Punched defined. In the "Punch Lookup Values / Code" field, enter one or more values and select Static from the drop-down menu. Optionally, enter a Groovy script in this field, and select Dynamic from the drop-down menu. 

  1. Click into the "Process Date" field, pick the desired date from the calendar pop-up, and select Static from the drop-down menu. Optionally, enter a Groovy script in this field to calculate the date processed, and select Dynamic from the drop-down menu

  2. You can set various limits on Punch Cards on the Advanced Details tab. If you want to ignore these limits, select Yes from the "Ignore Limits" drop-down menu. 

  3. To skip missing named punches, select Yes from the "Skip Missing Named Punches" drop-down menu. 

  4. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

Badges

The following Action types relate to managing a Member's Badges.

 Action Type: Expire Badge

Click hereClick here

To expire a Member's Badge:  

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Expire Badge

  2. From the "Badge" drop-down menu, select the desired Badge.

  3. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

 

 Action Type: Grant Badge

Click hereClick here

To grant a Badge to a Member:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Grant Badge

  2. From the "Badge" drop-down menu, select the desired Badge.

  3. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

Offers

The following Action types relate to managing a Member's Offers. 

 Action Type: Grant Offer

Click hereClick here

To grant an Offer to a Member:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Grant Offer

  2. From the "Offer" drop-down menu, select the desired Offer.

  3. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

Gift Cards

The following Action types relate to managing a Member's Gift Cards. 

 Action Type: Grant Gift Card

Click hereClick here

To issue a Gift Card to a Member:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Grant Gift Card

  2. From the "Gift Card Class" drop-down menu, select the desired Gift Card.

  3. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

Integration

The following Action types are used to integrate Marigold Loyalty with other systems.

 Action Type: Send Marigold Engage+ Email

Click hereClick here

To trigger the deployment of a Marigold Engage+ Email Campaign:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Send Marigold Engage+ Email

  2. From the "Connection Profile" drop-down menu, select the desired Messaging Connection Profile. Optionally, click the "jump to" icon to navigate to the Connection Profile screen. 

  3. In the "Target Table" field, enter the name of the Campaign's source table in Messaging. 

  4. In the "Campaign ID" field, enter the "Running Campaign ID" of the launched Messaging Campaign. 

  5. Optionally, in the "Content Sources" field, enter any desired content sources. 

  6. You may need to add custom parameters within the Custom Parameters section if, for example, you're using values from Loyalty to populate Personalization Fields within the email message content. To define custom parameters, click add.

  7. Check enabled.

  8. In the "Name" field, enter the name of the desired field as it appears in the Merge Symbol in the Messaging content. You must use the internal name of the field, and not its display name. For example, let's say you have a message that uses first name and last name values to personalize the message. You would need to add those Merge Symbols to the email content in Messaging, like this: 

Hello, {(name_first)} {(name_last)}

The values in these Merge Symbols must reference existing fields in the Campaign's source table in Messaging. Otherwise, the Messaging application will display an error message when you try to save or launch the Campaign. 

Then, within the "Name" field in the "Custom Parameters" section, you would need to enter those same values (without the brackets), as used in the Merge Symbols.

  1.  In the "Value" field, when personalizing the email message content with Loyalty Member Attribute values, enter an expression such as the following. 

getMemberValue('<attribute_internal_name>')

The value within the parentheses must contain the name of the corresponding Member Attribute within the Loyalty database. Be sure to use the Attribute's internal name, not its display name.

  1. Uncheck static

  2. Repeat the above steps as needed to add more custom parameters.

  3. Optionally add Content Tokens as described below. Content Tokens allow you to use data from other Loyalty objects, such as Punch Cards or Offers. Unlike Customer Parameters, which pull data from the Member table, Content Tokens open up access to data in other objects. 

Add Content TokensAdd Content Tokens

To add Content Tokens to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the Content Token. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to reference additional Content Tokens.

  6. Optionally, to delete a Content Token, click the trash can icon next to the name / value pair. 

  1. Click save.

 

 Action Type: Send Webhook (Basic)

Click hereClick here

To trigger the deployment of a webhook message to an external system:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Send Webhook

  2. From the "Method" drop-down menu, select an HTTP method. The platform supports GET, POST, PUT, and DELETE.

  3. In the "URL" field, enter the URL for the Webhook endpoint. 

  4. Header parameters are included in the request header. Usually, the header includes authorization parameters. To define Header parameters, click add within the "Request Header" section. The platform adds a new row for defining a key / value pair. 

  5. Check enabled (this check box is checked by default). 

  6. In the "Name" field, enter the name of the parameter.

  7. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  8. Repeat the above steps as needed to define additional Header parameters.

Frequently, Webhook calls include a JSON object in the request body, consisting of one or more key /value pairs. When defining the Request Body parameters, the platform allows you to enter these key / value pairs directly into the user interface. Optionally, you can also enter the "raw" JSON object. If you don't submit the raw JSON object, the platform submits the request as form data. 

Please note that in order to include double-quotes in a JSON value, you must escape the double-quote with a backslash. For example:

{"test": "<strong style=\"font-style: italic\">Hello World</strong>"}

  1. To enter the Request Body parameters, select the Custom tab within the "Custom Parameters" section, then click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional Request Body parameters.

  6. Optionally, to enter the raw JSON object, select the Raw tab within the Custom Parameters section, then enter the JSON object within the Request Body field. 

  7. Click save.

 

 Action Type: Send Webhook (Advanced)

Click hereClick here

The Advanced version of the Send Webhook Action expands on the Basic version (described above) to provide support for entering URL and query parameters. To trigger the deployment of a webhook message to an external system:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Send Webhook (Advanced)

  2. From the "Method" drop-down menu, select an HTTP method. The platform supports GET, POST, PUT, and DELETE.

  3. In the "URL" field, enter the URL for the Webhook endpoint. 

  4. The "URL Parameters" section is used to enter Path parameters that appear within the endpoint URL, but before any Query parameters (that is, before the question mark). To define Path parameters, click add within the "URL Parameters" section. The platform adds a new row for defining a key / value pair. 

  5. Check enabled (this check box is checked by default). 

  6. In the "Name" field, enter the name of the parameter.

  7. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  8. Repeat the above steps as needed to define additional Path parameters.

  9. The "Query Parameters" section is used to enter Query parameters that appear after a question mark (?) in the endpoint. Each parameter is listed one right after the other with an ampersand (&) separating them. To define Query parameters, click add within the "Query Parameters" section. The platform adds a new row for defining a key / value pair. 

  10. Check enabled (this check box is checked by default). 

  11. In the "Name" field, enter the name of the parameter.

  12. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  13. Repeat the above steps as needed to define additional Query parameters.

Note: Query parameters must be included within the URL field above. The syntax is to use a percentage sign (%) followed by the "Name" in curly brackets. For example: https://api.eccmp.com/services2/api/SearchRecords?crm_id=%{id}

  1. Header parameters are included in the request header. Usually, the header includes authorization parameters. To define Header parameters, click add within the "Request Header" section. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter.

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional Header parameters.

Frequently, Webhook calls include a JSON object in the request body, consisting of one or more key /value pairs. When defining the Request Body parameters, the platform allows you to enter these key / value pairs directly into the user interface. Optionally, you can also enter the "raw" JSON object. If you don't submit the raw JSON object, the platform submits the request as form data. 

Please note that in order to include double-quotes in a JSON value, you must escape the double-quote with a backslash. For example:

{"test": "<strong style=\"font-style: italic\">Hello World</strong>"}

  1. To enter the Request Body parameters, within the "Form Data / Request Body" section, click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional Request Body parameters.

  6. Optionally, enter the raw JSON object within the Request Body field. 

  7. Click save.

 

 Action Type: Invoke Connector

Click hereClick here

To invoke a Connector to an external system:

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Invoke Connector

  2. From the "Connector" drop-down menu, select the Connector type. 

  3. The "Connection Profile drop-down menu is populated with the Connection Profiles of the type you selected above. From this drop-down menu, select the desired Connection Profile. 

  4. From the "Method" drop-down menu, select an HTTP method. The platform supports GET, POST, PUT, and DELETE.

  5. In the "URL" field, enter the URL for the endpoint. 

  6. The "URL Parameters" section is used to enter Path parameters that appear within the endpoint URL, but before any Query parameters (that is, before the question mark). To define Path parameters, click add within the "URL Parameters" section. The platform adds a new row for defining a key / value pair. 

  7. Check enabled (this check box is checked by default). 

  8. In the "Name" field, enter the name of the parameter.

  9. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  10. Repeat the above steps as needed to define additional Path parameters.

  11. The "Query Parameters" section is used to enter Query parameters that appear after a question mark (?) in the endpoint. Each parameter is listed one right after the other with an ampersand (&) separating them. To define Query parameters, click add within the "Query Parameters" section. The platform adds a new row for defining a key / value pair. 

  12. Check enabled (this check box is checked by default). 

  13. In the "Name" field, enter the name of the parameter.

  14. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  15. Repeat the above steps as needed to define additional Query parameters.

Note: Query parameters must be included within the URL field above. The syntax is to use a percentage sign (%) followed by the "Name" in curly brackets. For example: https://api.eccmp.com/services2/api/SearchRecords?crm_id=%{id}

  1. Header parameters are included in the request header. Usually, the header includes authorization parameters. To define Header parameters, click add within the "Request Header" section. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter.

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional Header parameters.

Frequently, Webhook calls include a JSON object in the request body, consisting of one or more key /value pairs. When defining the Request Body parameters, the platform allows you to enter these key / value pairs directly into the user interface. Optionally, you can also enter the "raw" JSON object. If you don't submit the raw JSON object, the platform submits the request as form data. 

Please note that in order to include double-quotes in a JSON value, you must escape the double-quote with a backslash. For example:

{"test": "<strong style=\"font-style: italic\">Hello World</strong>"}

  1. To enter the Request Body parameters, within the "Form Data / Request Body" section, click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional Request Body parameters.

  6. Optionally, enter the raw JSON object within the Request Body field. 

  7. Click save.

Miscellaneous

Additional Action types are described below. 

 Action Type: Create Activity

Click hereClick here

To have the Trigger create an Activity record for a Member:  

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Create Activity

  2. In the "Member ID" field, either:

  • Enter a Groovy funciton to select the desired Member ID value, and select Dynamic from the drop-down menu.

  • Enter the Member ID value, and select Static from the drop-down menu. 

  1. From the "Activity Name" drop-down menu, select the desired Activity type. 

  2. Optionally add custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save

 

 Action Type: Grant Dynamic Response

Click hereClick here

To support loyalty programs that want to grant Offers by passing an Offer reference dynamically via an Activity, you can use the "Grant Dynamic Response" Action type. This Action supports generating an Offer Response. 

  1. In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Grant Dynamic Response

  2. Specify the following two custom parameters; these parameters are required for this Activity type.  

  • Content Type: In the "Name" field, enter "content_type." In the "Value" field, either enter "offer" and check static, or enter a dynamic Groovy expression that evaluates to "offer," and uncheck static

Note: Future releases of Marigold Loyalty will support additional content types, such as Reward, Challenges, and Punch Cards. 

  • Content Name: In the "Name" field, enter either "content_id" (if the Activity passes an Offer ID) or "content_name" (if the Activity passes an Offer internal name). In the "Value" field, enter the getActivityValue(“<attribute_name>”) function that specifies the internal name of the Activity attribute as the argument. Uncheck static

  1.  Optionally add any necessarry additional custom parameters as described below. 

Add Custom ParametersAdd Custom Parameters

To add custom parameters to a Trigger action:

  1. Click add. The platform adds a new row for defining a key / value pair. 

  2. Check enabled (this check box is checked by default). 

  3. In the "Name" field, enter the name of the parameter. 

  4. In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static

  5. Repeat the above steps as needed to define additional parameters.

  6. Optionally, to delete a custom parameter, click the trash can icon next to the parameter. 

 

  1. Click save