Upload
edmonda-bertini
View
228
Download
5
Embed Size (px)
Citation preview
CRM 3.0
Gli strumenti di sviluppo e personalizzazione di Microsoft CRM 3.0
Marcello [email protected] Technology SpecialistMicrosoft Italia
Agenda
IntroduzionePersonalizzazione “Data &
Experience”Personalizzazione dei processiDeveloper ExperienceReporting & Business IntelligenceQ & A
CRM 3.0
Introduzione
Configurabile con il tuo business• Facilmente adattabile ai processi aziendali• Framework completamente personalizzabile• Motore di workflow e analiticoTecnologicamente avanzato• Gestione centralizzata e semplificata • Architettura SOA• Facile integrazione
Adattabile al tuo modo di operare• Esperienza nativa Office e Outlook• Semplice e utilizzabile off-line
Vendite Servizio
Marketing
Una completa soluzione di CRM che utilizza la potenza e
la produtttività della piattaforma Microsoft.
Microsoft CRM | Integrato e completo
Architettura piattaforma
Architettura di Microsoft CRM 3.0
Customization Points• Web services
• Permettono l’integrazione con altre piattaforme nonchè l’accesso a dati e logica di business di Microsoft CRM
• Callouts• Estendono le funzionalità dei Web Services e integrano logica di
business customWorkflow Assemblies• Estendono le funzionalità di Workflow
• UI customizations• Albero di navigazione Role based etc
• Schema customization• Aggiungere entità e proprietà nuove
• Form customization• Personalizzare form, viste e integrare elementi UI
• Form events• Sviluppo attraverso gli eventi per aggiungere logica
CRM 3.0
Personalizzazione “Data & Experience”
Personalizzazioni strutture dati
• Foundation per le soluzioni verticali
• Distribuzione dei cambiamenti più semplice
• Riduce la necessità di coinvolgere l’IT
Customer BenefitCustomer BenefitPersonalizzazione schema estensiva• Creare/Rinominare entità, attributi,
relazioni• Personalizzazione attività• Supporto per client Web e Offline
Gestione schema efficente• Strumento all’interno del web client• Permessi più granulari• Pubblicazione personalizzazioni senza
reset
Schema Portability• Import/Export supportato anche per
le nuove funzionalità
Personalizzazione dati
Design business forms e entità senza scrivere codice.
Utilizzo dei termini del vostro business in forms, viste e report
Sincronizza offline anche entità custom
Business design Business design flessibileflessibile
Creazione di una nuova entitàConsiderazioni
Ownership Type• Organization / User Owned (es Product/Account)
Entity Relationships• Primary/ Related Relationship (1 many/ many 1)
• Cascading Behavior • Parental / referential / referential restricted /
configurable cascading• Cascade all / active / user owned / none / remove link /restrict• Actions: Assign/ Share/ Unshare/ Reparent/ Merge/ Delete
• Mappings
Entity Security and Customizations
Personalizzazione esperienzaFlessibilità e supporto a soluzioni
• Foundation per soluzioni verticali
• Esperienza personalizzata consistente
• Minori costi per personalizzazione e upgrade
Customer BenefitCustomer BenefitForm Scripting• Field Events: OnLoad, OnSave, OnChange• Metodi per accedere a client /attributi /
state• Proprietà per ObjectID, Object Type Code
Form Customization• Supporto IFrame• layout migliorato• Supporto upgrade per estensioni ISV
registrate in ISV.config
Navigation• Navigatione custom via SiteMap• Integrazione con entità custom• Consistenza fra web e Outlook• Estensioni al menu Outlook
CRM Form Designer
• Look della form• Formato colonne• Add/remove/move
Fields/Tabs/Sections• Eventi legati ai campi• Add/configure
IFrames• Etichette
CRM Form Object Model
• Proprietà per accedere alle info della form aperta
• Metodi che permettono l’invocazione di azioni sulla form
• Sintassi: • crmForm.propertyname
• Accesso ai campi della form• crmForm.all.
{field_schema_name}
CRM From Object Model Esempi
//Setup variablesvar CRM_FORM_TYPE_CREATE = "1";var CRM_FORM_TYPE_UPDATE = "2";
//Test the FormType and ObjectId properties:switch (crmForm.FormType){ case CRM_FORM_TYPE_CREATE: alert("This is a create form."); break;
case CRM_FORM_TYPE_UPDATE: alert("This is an update form, the ID is " + crmForm.ObjectId); break;}
//Setup variablesvar CRM_ENTITY_ACCOUNT = 1;var CRM_ENTITY_CONTACT = 2;
//Test the ObjectTypeCode property:switch (crmForm.ObjectTypeCode){ case CRM_ENTITY_ACCOUNT: alert("This is an Account form."); break;
case CRM_ENTITY_CONTACT: alert("This is a Contact form."); break;}
Isv.config
• Possibilità di personalizzare toolbars/ menu
• Export, Edit, Import• Impostazioni viste anche da Outlook<configuration version="3.0.0000.0"> <Root> <ToolBar> <Button Title="XML Feeds" ToolTip="Guarda gli XML feed disponibili" Icon="/rss/rss.ico" Url="/rss/rss.aspx" WinMode="0" /> </ToolBar> </Root> <Entities>
<Entity name="account" >
Sitemap
• Possibilità di personalizzare completamente la navigazione
• Export, Edit, Import• Impostazioni viste anche da
Outlook• Integrazione con le entità custom
<SiteMap> <Area Id="Workplace" Title="Area di lavoro" ResourceId="Area_Workplace" ShowGroups="true" Icon="/_imgs/workplace_24x24.gif“ DescriptionResourceId="Workplace_Description"> <Group Id="MyWork" Title="Personale" ResourceId="Group_MyWork" DescriptionResourceId="My_Work_Description">
<SubArea Id="nav_activities"
CRM 3.0
Overview strumenti di personalizzazioneEs “integrazione con Mappoint service”Es nuova entità fornitoreArea BI
CRM 3.0
Personalizzazione dei processi
Workflows
Workflow
Realizzazione di regole per automazione di processi
Strumenti in base al profilo• Workflow Editor
• Realizzazione di workflow (admin)• Su attività• Entità custom etc
• Estensione di azioni/condizioni (dev)• Workflow Monitor (debbugger per admin)• Callout (dev)
Strumenti di workflow per i processi di Business
• Workflow Editor• Creazione, modifica,
impostazioni regole di workflow.
• Workflow Monitor• Status dei processi di
workflow in corso
Estensibilità – Nuove AzioniCreazione nuove Azioni / Condizioni
Estensione del workflow con codice custom
• .NET based• Facile subscription e deployment• Workflow manager support• Integrazione con VS.NET & CRM Web
Services• Messaggi Rich context
BenefitBenefit
Managed Assembly
Work flow Rule
ReturnParamters
InputParameters
Work flow Rule
• Modellazione di processi ricca e flessibile
Estensione regole di Workflow Creazione di estensioni con assembly .NET
• Es: creazione di sito sharepoint collegato alla creazione di una opportunità
<method name=“CreateSite" <method name=“CreateSite" assembly=“Sharepoint.dll" assembly=“Sharepoint.dll" typename=“Sharepoint.SiteCreator" typename=“Sharepoint.SiteCreator" methodname=“CreateSite“methodname=“CreateSite“
group=“Sharepoint Functions”>group=“Sharepoint Functions”><parameter name=“ID" datatype=“lookup“ <parameter name=“ID" datatype=“lookup“
entityname=“account”/>entityname=“account”/><parameter name=“Name" datatype=“string"/><parameter name=“Name" datatype=“string"/>
</method></method>
Estensione regole di Workflow Creazione di estensioni con assembly .NETModifica file workflow.config
Extensibilità - CalloutEstensioni attraverso logica custom• .NET e basati su eventi• Facile subscription e deployment• Eventi POST e PRE• Ricche informazioni contestuali• Integrazione con Web Services CRM• Sincroni e transazionali
CRM Application
CRM Tools
CRM SDK
CRM Platform Method
Pre-Callout
Platform Core Operation
Post-Callout
BenefitBenefit
• Costruzione di soluzioni fortemente integrate
Estensibilità - Callout
• Es: assembly.NET per tracciare cambiamenti di sconto e mandare messaggi di modifica
• .NET assembly per il calcolo dello sconto
<callout.config version="3.0"><callout.config version="3.0"> <callout entity="<callout entity="quotequote" event="" event="PostUpdatePostUpdate">"> <subscription assembly="<subscription assembly="MessagingPlugin.dllMessagingPlugin.dll" " class="MessagingPlugin.Messages">class="MessagingPlugin.Messages">
<prevalue><prevalue>discountpercentagediscountpercentage</prevalue></prevalue><postvalue><postvalue>discountpercentagediscountpercentage</postvalue></postvalue><prevalue><prevalue>totallineitemamounttotallineitemamount</prevalue></prevalue><postvalue><postvalue>totallineitemamounttotallineitemamount</postvalue></postvalue>
</subscription></subscription> </callout></callout></callout.config></callout.config>
Pre-Callout• Sincrono• Parametri gestiti:
• Entity e User Context • Attribute “influenzati”
• Modifica dati “on the fly”• Gestione controllo attraverso comandi
Continue, Stop, Abort
Pre-CalloutComponent
PlatformMethod
Call
EntityContext
UserContext
AttributeSet
ModifiedAttribute
Set
ReturnCode
Custom Error
Message
Eventi
PreCreate
PreUpdate
PreDelete
PreAssign
PreSetState
PreMerge
Post-Callout• Sincrono• Informazioni ricche:
• Stato pre• Stato post
Eventi
PostCreate
PostUpdate
PostDelete
PostAssign
PostSetState
PostMerge
Post-CalloutComponent
PlatformMethod
Call
EntityContext
UserContext
AttributeSet
(Pre-Image)
ReturnCode
AttributeSet
(Post-Image)
Callout Esempio di codice
public class CalloutSample : CrmCalloutBase{ // This function is called before an account is created. public override PreCalloutReturnValue PreCreate(CalloutUserContext userContext, CalloutEntityContext entityContext, ref string entityXml, ref string errorMessage) { ..... return PreCalloutReturnValue.Continue; }}
CRM 3.0
Personalizzazione dei processi
Processo di venditaIntegrazione con sharepoint
CRM 3.0
Developer Experience
Developer Experience
Integrazione con Visual Studio .NETIntegrazione con Visual Studio .NET• Supporto estensivo a IntelliSense• Classi e messaggi “Strongly typed”• Managed code development model
Pieno supporto alle Pieno supporto alle personalizzazionipersonalizzazioni
• Generazione dinamica dei type (WSDL)
• Seamless programming model• Supporto al Polimorfismo
• Sviluppo veloce e a basso costo.
• Scrivi meno codice.
BenefitsBenefits
• Meno codice e più generico
SOA & InteroperabilitàSOA & Interoperabilità• WSDL e modello “platform
independent”• Compliancy a Standard (WS-I BP
V1.1) • Gestione dei web service semplice
per tutte le entità
• Facile integrazione con altre applicazioni
Microsoft CRM Web Services
• WSI, BP v1.1, WSDL, Single Endpoint • Strongly typed• .NET based• CRM Web Service
(CrmService.asmx)• Accesso ai dati di tutte le Entità
(incluse entità custome e proprietà)• Esecuzione delle business op
(business logic e op specializzate)• Metadata Web Service
(MetadataService.asmx)• Accesso ai metadati del CRM
CrmService
SoapHttpClientProtocolClass
Properties
CallerIdValue
Url
UseDefaultCredentials
Methods
Create
Delete
ExecuteFetch
Retrieve
RetrieveMultiple
Update
MetadataService
SoapHttpClientProtocolClass
Properties
UrlUseDefaultCredentials
Methods
GetTimestampRetrieveAttributeMetadataRetrieveEntityMetadataRetrieveMetadata
Confronto fra Web ServicesV3.0 vs. V1.x
V1.X Web Services Nuovi web services
XML based (no type support)•Runtime errors
Strongly typed•Design/Compile time errors•Core Entities and Properties•Custom Entities and Properties•Strongly typed child properties•Browse-able class hierarchy
Precompiled static Proxy dlls Dynamically generated WSDL
N Entities N Web ServicesLow scalability
N Entities One Web Service High scalability
No versioning Versioned schema and Web Service
.NET only Dll based deployment Any platform WSDL with no deployment
Low consistency High level of consistency on naming, types and operations support
CrmService: Metodi comuni
• Create - System.Guid Create(BusinessEntity businessEntity)
• Crea un istanza di una qualsiasi entità• Retrieve - BusinessEntity Retrieve(string bEName, Guid bEId, ColumnSet
columnset)
• Ottiene una istanza di una entità già presente nel CRM• RetrieveMultiple - BusinessEntityCollection RetrieveMultiple
(QueryBase queryBase)
• Usa una query custom (QueryExpression) per ottenere risultati strongly typed
• Update - void Update (BusinessEntity businessEntity)
• Aggiorna una istanza di entità estitente nel CRM• Delete - void Delete (string bEName, Guid bEId )
• Cancella una istanza di entità dal CRM• Fetch - string Fetch (string FetchXML)
• Usa una query custom (FetchXML) per ottenere risultati in formato XML (genericamente utilizzabile)
Differenze: 1.2 vs 3Creazione account e contatto
String accountId = account.Create(userAuth, accountXml.ToString()); String contactId = contact.Create(userAuth, contactXml.ToString());
Guid actId = service.Create(act); Guid contId = service.Create(cont);
Utilizzo di CrmService Esempio di Creazione di un Account
// Set up the Web service. CrmService service = new CrmService(); service.Url = "http://<servername>/mscrmservices/2006/crmservice.asmx"; service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Create an account entity and assign data to some attributes. account newAccount = new account(); newAccount.name = "Greg Bike Store"; newAccount.accountnumber = "123456"; newAccount.address1_postalcode = "98052"; newAccount.address1_city = "Redmond";
// Call the Create method to create an account. Guid accountId = service.Create(newAccount);
Utilizzo di CrmService Esempio di codice per il controllo della duplicazione di un account
CrmService service = new CrmService();service.Credentials = System.Net.CredentialCache.DefaultCredentials;
QueryByAttribute attributeQuery = new QueryByAttribute();attributeQuery.Attributes = new string [] {"name"};attributeQuery.Values = new string [] {newAccountName};attributeQuery.EntityName = EntityName.account.ToString();
RetrieveMultipleRequest retrieve = new RetrieveMultipleRequest();retrieve.Query = attributeQuery;RetrieveMultipleResponse retrieved = (RetrieveMultipleResponse)service.Execute(retrieve);
// Render the response to the callerif (retrieved.BusinessEntityCollection.BusinessEntities.Length > 0){
//duplicated found}else{
//duplicated NOT found}
Utilizzo di CrmMetadataService Esempio di codice per ottenere due array di entità custom e non
// Retrieve the metadata and build two arrays, // one that contains core entities,
// the other custom entities.
MetadataService service = new MetadataService(); Metadata md = service.RetrieveMetadata(MetatDataFlag.Entities); ArrayList coreEntities = new ArrayList(); ArrayList customEntities = new ArrayList(); foreach (EntityMetadata em in md.Entities) {
if (em.IsCustomEntity) customEntities.Add(em.name);
else coreEntities.Add(em.name);
}
CRM 3.0
Building powerful applications
DupDetection & CalloutIntegrazione con Windows Desktop SearchRss Feeds
CRM 3.0
Reporting & BI
Analisi dei dati Analisi dei dati con strumenti familiari ed efficaci
Report sui tuoi dati aggiornati “in-context”
Pivot e grafici generati dinamicamente con Microsoft Excel
Pianifica e distribuisci I report
Analisi del Analisi del business business immediataimmediata
Reportistica integrata / cruscotti
Accesso ai dati CRM da Office
Reportistica: riassumendo...Strumenti di reportistica per diversi profili
• Non più solo in area “Report”• Report pre filtrabili contestuali (nelle form, liste
o area reporting)• Disponibili anche in Outlook
• Strumenti disponibili per diversi profili• Viste – “My expiring cases”, “My accounts”, …• Integrazione con Excel – PivotTable dinamiche• SRS Reports – “Account Overview”, …• Cruscotti aziendali con sharepoint• Business Data Lookup Snap in per Office
Reporting Services Report
Request
Report Request
Query on Filtered View
Reporting Services Server
Secure CRM Data
Database
Report SRS: elementi chiave
CRM 3.0
Great reports
Report dinamici con ExcelEsempio di report con RSBusiness Data Lookup Snap inEsempio di cruscotto con sharepoint
Riassumendo• Microsoft CRM V3.0:
• Fornisce un insieme di funzionalità di estensione e integrazione che permette la creazione di potenti applicazioni di business
• Facilmente integrabile con applicazioni esterne attraverso Web services e XML
• Ricca development experience
Links utili
• Crm SDK• Downloadable• Online
• GotDotNet Crm Sandbox Home• “Microsoft Crm” Newsgroup • “Microsoft Crm Developer” Newsgroup• ”Microsoft Crm Deployment” Newsgroup• Microsoft CRM DemoLab• Blogs vari
• Mid Atlantic Microsoft CRM
© 2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
• Mapping from Version 1.2• For the most part, Microsoft CRM 3.0 SDK is backward compatible with previous
versions. This means that you can include the old DLLs from the previous version and your code will still work using the old programming style. There are a few exceptions:
• Activities. CRMActivity and CRMEmail proxy objects are not supported. Code written against these objects must be converted to the new programming model.
• Methods that create activities. This includes CRMSalesOrder.Cancel, CRMOpportunity.Lose, and CRMIncident.Close.
• Workflow. CRMProcess proxy object is no longer supported. It is recommended that all workflows be created using the Workflow Manager.
• Rich Client Sync. Use of the CRMRichClientSync proxy object is no longer supported.
• CRMCustomization. This class is no longer supported. Use the message InitializeFrom to transform entity instances.
• CRMSalesperson. This entity is no longer supported. Use systemuser instead. • CRMAnswer. This entity is no longer supported. • Teams security. Teams cannot own objects in Microsoft CRM 3.0. • MakePrivate/MakePublic. These methods are no longer supported. • Organization. The organization entity does not support Create, Delete, Enable, and
Disable actions. • Warning Microsoft CRM V1.x APIs located in the assemblies
Microsoft.Crm.Platform.Proxy, Microsoft.Crm.Platform.Types and http://<server name>/mscrmservices/*.srf are deprecated and are considered obsolete. This means that these APIs may not be supported in future versions of Microsoft CRM. You should avoid the use of Microsoft CRM V1.X APIs and you are strongly encouraged to migrate and develop your applications using the Web services that are described in this version of the Microsoft CRM 3.0 SDK and the accompanying documentation.
Upgrade unsupported 1.2 a 3
• Modifiche al DB • Qualsiasi modifica diretta a tabelle viste sp (es
campi aggiunti alla AccountBase)
• Integrazioni con DB• Accesso diretto
• Personalizzazioni di Form• Modifiche dirette a Aspx, js, xml, css etc
• Modifiche su IIS • Sviluppo custom non previsto in SDK