Sometimes you may need content for campaign suggested automatically instead of user typing it in. We added a new feature to allow you to do this. In order to activate this feature please follow steps below.
To enable Campaign Content Suggestions, you will need to go to your Admin Dashboard —> Campaign Settings —> and scroll down to Content Suggestion Endpoint.
Enter in the Custom API endpoint URL. Ex: http://api.mysite.com/v1/suggestions. Note that only the campaign blurb, description, and FAQ fields can be pre-set or pre-filled with content suggestion results returned from your API endpoint URL at this time. Remember to click save changes at the bottom.
IMPORTANT: If you are doing this on live (production) website then always use https or SSL based URL for the endpoint, e.g. https://api.mysite.com/v1/suggestions. Remember to not mix http and https connections.
Next to see suggestions in action, go to your Campaign Details Step for example. You will notice under your description field that there is a drop down with your suggestions coming directly from the endpoint configured as per above.
Select the drop down option that you want and that field will be automatically pre-filled with the content suggestion. Scroll down, and click Save Changes to save your campaign data.
IMPORTANT: When implementing the API suggestion endpoint you need to follow the specification outlined below to ensure suggestion data can be displayed and used on the campaign creation steps, i.e. your API endpoint needs to return the suggestion data in the specific format outlined below in order for it to work correctly.
At the very root or upper level we have “suggestions” key or attribute.
Then we have special keys for the fields, which are “blurb”, “description” and “faq”. Each one of these fields has special attributes called “title” and “content” which provide drop down title and field content respectively. FAQ section is slightly different and has “name” attribute as well which is container name for the FAQ and “question” and “answer” attributes which are used to define FAQ pair (question and answer).
Finally note that each field can have array of suggestions (“title” and “content”) which are used to populate the drop down list and then will be automatically inserted into the field input when selected. You can have multiple campaign blurbs, descriptions or FAQ’s suggested.
{ "suggestions": { "blurb": [ { "title": "Sample Blurb #1", "content": "Sample Blurb Content #1", }, { "title": "Sample Blurb #2", "content": "Sample Blurb Content #2", } ], "description": [ { "title": "Sample Description #1", "content": "Sample Description Content #1", }, { "title": "Sample Description #2", "content": "Sample Description Content #2", } ], "faq": [ { "title": "Sample FAQ #1", "name": "Sample FAQ #1 Name", "content": [ { "question": "Sample Question #1", "answer": "Sample Answer #1" }, { "question": "Sample Question #2", "answer": "Sample Answer #2" } ] }, { "title": "Sample FAQ #2", "name": "Sample FAQ #2 Name", "content": [ { "question": "Sample Question #1", "answer": "Sample Answer #1" }, { "question": "Sample Question #2", "answer": "Sample Answer #2" } ] } ] } }