Is it possible to create Audience Manager Address Books using the Core Service (Tridion 2011 SP1)?
(Or automate creating them in any other way - db script, Interop?)
Cheers
There is no Audience Manager functionality in the Core Service; only Content Manager functionality is exposed there.
You can, however, use the public API (Tridion.AudienceManagement.API) on the server to create any item you want. You didn't specify the kind of Address Book you want to create - but I'm going to assume you want a static one to create Contacts in.
Here is some sample code to do that:
StaticAddressBook denmark = new StaticAddressBook();
denmark.Title = "Denmark";
denmark.Key = "DK";
denmark.Save();
If you want to create a Dynamic Address Book instead, you'll need to specify a filter too; let me know if that's the case and I can provide some sample code for that too.
You can use the Tridion.OutboundEmail.ContentManagement namespace. In there is an AddressBook object (or you can use StaticAddressBook depending on the type of AB you want to create). Something like this should work:
AddressBook ab = new AddressBook();
ab.Title = "The title of my new Address Book";
ab.Save();
Looking at the API for StaticAddressBook (it's documented) there's a static method StaticAddressBook.CreateLocalAddressBook that might actually be more relevant in this instance. I'd check it out if I were you ;) You can download the docs from SDLTridionWorld.com
Related
We are trying to copy conference data from one event to other but it not working for non G-suite accounts. We are using Google.Apis.Calendar.v3 libraries for .net. Following is sample code :
Event firstEvent = service.Events.Get(calendarId, "eventId1").Execute();
secondEvent.ConferenceData = firstEvent.ConferenceData;
The same code works for G-suite accounts. Is there anything special that needs to be done for non Gsuite accounts or its not supported for them? May be we are missing something. Actually issue is instead of copy conference data it gives new conference data i.e new link, new signature even if same object is set to copy. It should give same link, same copy ConferenceData after creation, isn't it?
Any help will be appreciated. Thanks in advance!
References :
https://developers.google.com/calendar/create-events
https://developers.google.com/calendar/v3/reference/events/insert
This is an intended behavior. New events with attendees create a Conference automatically, so it's not possible to change it with the API. G Suite users don't have this limitation and can disable this option from the Admin console.
In my app, I am sending invitation to people to join my app. I am using AppInvitation IntentBuilder Class to create Intent. After these steps, one URL-link gets generated that we can send to invitees.
I have written below code to generated that link and start the activity to send the link. I am able to send invites and able to successfully launch the app by clicking the dynamiclinks. Both the dynamically and manually created ones.
IDictionary<string, string> values = new Dictionary<string, string>();
values.Add("utm_campaign", "Health");
values.Add("utm_medium", "GoIbibo");
values.Add("ad", "1");
values.Add("credit", "50");
values.Add("utm_source", "Yahoo");
values.Add("afl", "https://www.facebook.com");
var intentbuidl = new AppInviteInvitation.IntentBuilder(MainActivity.mainActivity.GetString(Resource.String.invitation_title))
.SetMessage(MainActivity.mainActivity.GetString(Resource.String.invitation_message))
.SetDeepLink(Android.Net.Uri.Parse(MainActivity.mainActivity.GetString(Resource.String.invitation_deep_link)))
.SetAdditionalReferralParameters(values)
.Build();
MainActivity.mainActivity.StartActivityForResult(Intent.CreateChooser(intentbuidl, "Install"),0);
Generated link: https://aku4q.app.goo.gl/i/619426442529-4a4105fd-33ea-4b0f-bf07-6f4063eef8f8
So my question is, when do invitees open the app using this link? Can we be able to get these additional parameters which I have set using IDictionary from the above generated link?
To my knowledge, no. This is one of the limitations of Firebase deep linking — you can't pass custom parameters and need to use the URL string for everything.
You could check out Branch.io (full disclosure: I'm on the Branch team) for an alternative approach that does allow custom parameters.
We're working on a web based CRM for my company in ASP.net. I frequently have to send newsletters to all of my customers, and it becomes tedious to manually copy all of their addresses. What I would like is a feature to send one mail to all of my customers, taking their addresses from our contacts database, similar to a mail merge.
My developer said that he can do this for Emails, but not for physical mail. His reasoning behind this is that he can write a script that sends the mails to all customers one by one, but he can only give one single print command, which would only be able to print the current contents of the page. Therefore, he would not be able to print the individual letters for all of the customers.
Does anyone have ideas on how this would be possible? E.g. printing the page in such a way that each letter would be printed on a seperate page, or another way to automatically print all of the letters (with the mailmerged fields)?
Any help will be appreciated. If you require more details, please tell me.
A webpage is not the right solution to physically print letters. What you need to produce is a report that would generate a PDF file. This report will generate a PDF document with a different customer address on each page. Try using Microsoft Reporting Services, it is included in SQL Server. Crystal Reports is also a popular reporting solution too.
Also, you will have a hard time printing the stylized contents of your nice looking e-mail in the reporting solutions mentioned above. Consider using the report only as the cover letter of your mail piece.
One possible solution is to use 3rd party library for creation of individual letters for your customers. Docentric Toolkit is .NET tool that solves exactly your problem. We are using it for creating individual letters for customers and they all are merged in one file so that printing is done only once. Users can even create or change template documents.
Next you would have to create a template document in MS Word where you would include fixed content and placeholders for variable content which would be filled in at runtime with customer information.
After processing the data in .NET application you merge the data with the template document (see code snippet below). Your final document will be one file with letters for your customers, each on its own page. This file can then be sent to the printer with one print command.
I am attaching a code snippet of a Main method of the sample console application. The project has references to Entity Framework and Docentric’s dlls and uses entity model of Northwind database.
As you can see, it is really easy to prepare the data and merge it with template document. Solution is suitable for ASP.NET and MVC applications because you don’t need Microsoft Office installed on the server.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Docentric.Word;
namespace DisplayCustomers
{
class Program
{
static void Main(string[] args)
{
// first we read customers - in the example we select only customers
// from USA and Canada and order them by country and customer name
List<Customers> customerList = new List<Customers>();
using (var db = new NORTHWNDEntities())
{
customerList = db.Customers
.OrderBy(o => o.Country)
.ThenBy(o => o.CompanyName)
.Where(w => w.Country == "USA" || w.Country == "Canada")
.ToList();
}
// next we merge customers data with the template and generate final document;
string templateDoc = #"C:\Test\Templates\CustomerLetter1_templ.docx";
string outputDoc = #"C:\Test\FinishedLetters\CustomerLetters1.docx";
DocumentGenerator dg = new DocumentGenerator(customerList);
DocumentGenerationResult result = dg.GenerateDocument(templateDoc, outputDoc);
}
}
}
I am using linked-in j library.
I am able to connect with linked-in but when i go for details for the profile of current user then i get whole Person object but this object only contain the values of first name, last name and headline.And other values are null.
But when i go to my linked-in public profile their i can see the skills, college etc.
My application have full access.
I think you never set ProfileField's in enum
Please try like this,
Set<ProfileField> propertiesToFetch = EnumSet.of(ProfileField.ID,
ProfileField.FIRST_NAME, ProfileField.LAST_NAME,
ProfileField.HEADLINE, ProfileField.PICTURE_URL,
ProfileField.DATE_OF_BIRTH, ProfileField.PHONE_NUMBERS,
ProfileField.MAIN_ADDRESS, ProfileField.INDUSTRY,
ProfileField.EDUCATIONS, ProfileField.LANGUAGES_LANGUAGE_NAME,
ProfileField.SKILLS_SKILL_NAME,
ProfileField.CERTIFICATIONS_NAME, ProfileField.POSITIONS_TITLE,
ProfileField.POSITIONS_COMPANY_NAME,
ProfileField.POSITIONS_COMPANY);
Person profile = client.getProfileForCurrentUser(propertiesToFetch);
I need to share and unshare the content in alfresco using OpenCMIS, i read the documentation here for Apache Chemistry but i don't find this API functionality to share and unshare Documents.
So how can i do it programmatically?
I'm going to interpret your requirement as following:
You'd like to use Alfresco Share's "Quick Share"-Feature that is available in Alfresco Community 4.2 & Alfresco Cloud.
Alfresco Share uses the following internal API (REST/Webscript) to trigger a Quick Share:
POST /api/internal/shared/share/{store_protocol}/{store_id}/{node_id}
which return the generated quick share id as json:
{
"sharedId": "IHR65hlGT9yOTKwqPYMbRw"
}
The WebScript is implemented as Java-backed WebScript. Controller is
org.alfresco.repo.web.scripts.quickshare.ShareContentPost
that uses the following Service:
org.alfresco.repo.quickshare.QuickShareServiceImpl
As you can see here this Service generates a UUID (the link id) & sets the value as property qshare:sharedId (Aspect qshare:shared):
UUID uuid = UUIDGenerator.getInstance().generateRandomBasedUUID();
sharedId = Base64.encodeBase64URLSafeString(uuid.toByteArray()); // => 22 chars (eg. q3bEKPeDQvmJYgt4hJxOjw)
Map<QName,Serializable> props = new HashMap<QName,Serializable>(2);
props.put(QuickShareModel.PROP_QSHARE_SHAREDID, sharedId);
props.put(QuickShareModel.PROP_QSHARE_SHAREDBY, AuthenticationUtil.getRunAsUser());
nodeService.addAspect(nodeRef, QuickShareModel.ASPECT_QSHARE, props);
You should be able to do this via CMIS, but this Service also sets an Attribute via AttributeService (stores all shared-IDs per tenant):
attributeService.setAttribute(tenantNodeRef, ATTR_KEY_SHAREDIDS_ROOT, sharedId)
I'm not sure for which purpose this is used & if it is a MUST have for your requirement.