Hi,

I'm using Orders and Order Items section with a 1:N relationship. On the Order Item I maintain a re-order date for that specific item. When the Current Date equals the Re-Order Date I want to send emails to customers for all the records where this condition applies.

The email should contain Order Item details but also information from the Parent Order, the associated Account and the Contact associated with the Order.

Below is the workflow as I have it so far. I'm unsure how to read the associated data from the Orders, Account and Contacts related to the initial collection of records of Order Items and then how to use all of it to send one email per Order to the Primary Email of the Account and Cc to the contact on the Order. The email body should include the Product Name from Order Item, Order Number and Date. 

Thanks for your help.

 

 

 

 

 

  

 

 

Like 0

Like

2 comments

Unfortunately, it's not possible to send an email to a collection of users in a business process. The functionality is planned by the bpm'online development team.

Ad for now, please try to check the marketing campaigns and trigger mass mailings functionality. It might help.

https://academy.bpmonline.com/documents/marketing/7-15/campaigns-section#HT_section_campaigns

https://academy.bpmonline.com/documents/marketing/7-15/email-section#HT_section_email

One option I just made use of is Tags.  You can read an object, with or without a tag, then either send the email or tag the object and send the email, then delete the tag and cycle around, or just cycle around.

Let's say you have not tagged anything yet:

1. Read the first item from an object where a tag does not exist, and it meets your other filter criteria.  The Tag needs to exist as an option, so you would need to manually create the tag, or tag a record once (so the tag exists) and untag it.

2. XOR condition that the ID from step 1 is !=Guid.Empty.  Default flow is to end or go somewhere else.

3. Tag that record (insert a section record tag, for example Contact Section Record Tag).  This will denote that the object has the tag and will not be read again in step 1.

4. Send the email.

(You could probably switch steps 3 and 4 as desired)

5. Cycle back around to step 1 and read the next item where the tag does not exist.

OR you can do the opposite, where in step 1 you are searching for records that are already tagged, then you later delete the tag before cycling back around to search again.

Hope this helps!

Chris

 

Show all comments
7.14_()
sales

Hi,

How do we enable hybrid mode on Mobile? The system setting "Mobile application operation mode" allows only two options - "Online" and "Offline".

Thanks in advance...

Like 0

Like

1 comments

Hello,

Hybrid mode cannot be set manually. It is automatically enabled if the Internet connection is lost and you are using "Online" operation mode. It is also described in the Academy article here.

Please also note that hybrid mode is not present for bpm'online application versions that are less than 7.14.0.

Best regards,

Oscar

Show all comments
DataServices
insert
add contact along with its addresses
7.13_()
sales

Hello,

I have developed one service which inserts contact and contact-address from the third party to bpm'online. I have written below code to add contact and its Address simultaneously:

var insertContactQuery = new InsertQuery()

{

                    // Root schema name.

                    RootSchemaName = "Contact",

                    OperationType = QueryOperationType.Insert,

                    // New column values.

                    ColumnValues = new ColumnValues()

                    {

                        // Key-value collection.

                        Items = new Dictionary()

                                 {

                                     {

                                         "Account",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Account",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.AccountId,

                                                 DataValueType = DataValueType.Lookup

                                             }

                                         }

                                     },

                                     {

                                         "Name",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Name",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreContactFirstName + " " + item.StoreContactLastName,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "MobilePhone",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "MobilePhone",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StorePhoneNumber,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "ContactAddress",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Address",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreStreetAddress,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "ContactCity",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "City",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreCityName,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "ContactZip",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Zip",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreZipCode,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     }

                                 }

                    }

                };

am I doing something wrong? Please guide.

Like 0

Like

4 comments

Dear Riddhi,

Unfortunately, it is not possible to add data to the “Contact” and “ContactAddress” tables simultaneously using the approach that was described early. However, we can offer two ways solving the issue:

1. In order to add data via DataService please do the following:

-Create custom columns in the “Contact” object for storing the corresponding address values.

-Create a business process that will take the values from these columns and add them to the corresponding columns from the “ContactAddress” table.

Please note that we do not recommend using DataService for adding data to the database.

2. Create a web service for adding data. This approach is recommended for solving such types of the issues.

Best regards,

Norton

Norton Lingard,

Thanks, Norton. Can you please provide any reference link or example for adding records with web service? It would be really grateful.

Dear Riddhi,

Please find more information by link below:

https://academy.bpmonline.com/documents/technic-sdk/7-14/how-run-bpmonline-processes-web-service

Best regards,

Norton

Norton Lingard,

Thanks

Show all comments

Hi,

When trying to fill in the profile details, I am trying to provide some information in the details.

But only provide few info and save it and as i have filled in few details, percentage of the profile completion increases but is there way that the profile completion doesn't increases until i provide all the information in the details

Like 0

Like

1 comments

Dear Amritha,

You can change the data population percentage using the 'Data entry compliance' lookup. You can decrease the percentage for some particular parameters so that the user would need to fill more fields to get the completion increased.

Best regards,

Dean

Show all comments
email templates
Macros
7.14_()
sales

I have this Email template using Lead object as base.

The macro for the Owner Email will not work, but the MobilePhone and other will work perfectly.

Template

Result:

Like 0

Like

1 comments

Dear Julius.

Indeed, such macros doesn't work in the out of the box version of the application. To resolve this issue, you need to perform these steps:

1.Replace Lead object to the Custom package

2. Fill in the value of the column Owner and set it 'Owner' http://prntscr.com/pbotc9

3. Publish the object and compile the system.

Best regards,

Dean

Show all comments
data import
address
7.14_()
sales

As far as I've been able to determine with my testing, importing City information into a record will simply take the first record in the database by that name, regardless of whether it matches Country and State/Province information also present in the record, and if none are found, will create a City record with blank Country and State/Province fields.

Before I go and duplicate the lengthy business process I wrote to handle these imports more elegantly for every object one might import address information into, I just wanted to confirm:

Is this the expected behaviour, and is there no way in the system to have imports take country and region into account when matching cities, or am I missing something?

Like 0

Like

4 comments

Dear Darian,

Can you please specify what mapping are you using for such import? 

I've imported a lot of Country, State, Cities through Excel successfully.

Angela Reyes,

I'm mapping directly to City, State/province, and Country.  As I said, the imports do function, but the City field doesn't appear to take into account the contents of the other two when matching, which can lead to some rather nonsensical records.  I just wanted to confirm whether or not there's a workaround to that aside from a separate business process for each object type.

Darian Lewis,

If importing directly to "City" object - records will be created successfully if they meet duplicates search while import rules conditions. Correspondent records will be created in state/province and country lookups (but my tests showed that "Country" field value doesn't populate in "State/province" lookup when importing data into "Cities" lookup). Generally you should see new records and new records will be created in related objects. The only data that is not filled in as I said is "Country" field value in "State/province" lookup. I will report this problem to our R&D team so they could modify import process logic so it could also import this field value when importing to cities.

Show all comments

Can we assign multiple objects like leads, contacts to same lookup?

Like 0

Like

1 comments

Hello Nagaraju,

You can create a multi-lookup in the same way as it is created in an out-of-the-box version of the application for "Customer" field on an opportunity edit page (here is the screenshot of this field http://prntscr.com/p5ns1j) and achieve your business task in such a way. The code example can be found in OpportunityPageV2 (in Opportunity package) http://prntscr.com/p5nto6. Please analyze it and create the same logic for needed field.

Best regards,

Oscar

Show all comments
7.14_()
sales

I have created a process that is now currently running from the record in section. 

Idea is : 'Opportunity' should be allowed to be in Stage 'Closed Won' once the activity at Contracting is stage is complete . This activity can only be completed if there is an order created  for the opportunity. 

 

Now , I want to call this process from Cases . Could you please suggest how can we do it so that user does not have to run the process manually.

Like 0

Like

1 comments

There is an opportunity to add a sub-process to a stage of the case (https://prnt.sc/p5rb82). The sub-process will be launched automatically when the stage is active. After adding the sub-process please select the needed business process in the properties block (https://prnt.sc/p5reg5)

Show all comments

Hi,

 

I'm trying to retrieve a collection using EntitySchemaQuery but when try to assign it to a Parameter i get the following error:

System.NotSupportedException: EntityCollection
   at Terrasoft.Core.Process.FlowEngineStateService.InternalSetValue[T](Guid processUId, String parameterPath, T value)
   at Terrasoft.Core.Process.FlowEngineStateService.Terrasoft.Core.Process.IInternalProcessParameterStore.InternalSetParameterValue[T](Guid processUId, String parameterPath, T value)
   at Terrasoft.Core.Process.ProcessInstanceParameterStore.SetParameterValue[TValue](String parameterPath, TValue value)
   at Terrasoft.Core.Process.ProcessInstanceParameterStore.SetParameterValue[TValue](ProcessSchemaParameter parameter, Guid schemaElementUId, TValue value)
   at Terrasoft.Core.Process.ProcessModel.SetParameterValue[T](FoundParameterData result, T value)
   at Terrasoft.Core.Process.ProcessModel.TrySetValue[T](ProcessSchema processSchema, String propertyPath, T value)
   at Terrasoft.Core.Process.ProcessModel.Set[T](String propertyPath, T value)
   at Terrasoft.Core.Process.UsrGetLeadsBySalesCompanyMethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

Example code:

var salesCompanyId = Get<Guid>("InSalesCompany");
 
// Creating a query instance with the "Lead" root schema.
var esqLead = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Lead");
esqLead.AddColumn("UsrSalesCompany");
esqLead.AddColumn("CreatedOn");
esqLead.AddColumn("UsrLeadPriority");
esqLead.AddColumn("Id");
esqLead.Filters.Add(esqLead.CreateFilterWithParameters(FilterComparisonType.Equal, "UsrSalesCompany.Id", salesCompanyId));
 
// Filters in the query filter collection will be combined with the logical OR operator.
esqLead.Filters.LogicalOperation = LogicalOperationStrict.Or;
 
 
var entities = Get<ICompositeObjectList<ICompositeObject>>("ReadActiveOverrides.ResultCompositeObjectList");
foreach(var entity in entities) {
 
    Guid value;
    var fromSalesCompanyId = entity.TryGetValue<Guid>("UsrFromSalesCompany", out value) ? value : Guid.Empty;
    var toSalesCompanyId = entity.TryGetValue<Guid>("UsrToSalesCompany", out value) ? value : Guid.Empty;
 
    if(fromSalesCompanyId == Guid.Empty){
        throw new Exception($"fromSalesCompanyId it is an empty guid {entity.ToString()}");
    }
 
    if(toSalesCompanyId == Guid.Empty){
        throw new Exception($"toSalesCompanyId it is an empty guid {entity.ToString()}");
    }
 
	esqLead.Filters.Add(esqLead.CreateFilterWithParameters(FilterComparisonType.Equal, "UsrSalesCompany.Id", fromSalesCompanyId));
}
 
/*
Select selectEsq = esqLead.GetSelectQuery(UserConnection);
throw new Exception(selectEsq.GetSqlText());
*/
 
var res = esqLead.GetEntityCollection(UserConnection);
 
Set("OutLeads", res);

Paremeter OutLeads is a Collection of Objects (EntityCollection)

Any help is appreciated

 

Like 0

Like

6 comments

Theoretically, you can debug the business process and find the reason. Please check the "Server code debugging" article in the academy.bpmonline.com. However, I recommend you to investigate the situation one step forward. There is no way to operate EntityCollections in any business processes element except a script task. So probably it will be a good idea to continue processing the collection in the script task where it was created. Transferring collections might consume a lot of the application resources and decrease the performance if the collection is large.  

Additionally, please don't use "throw new Exception" at all. The fact that you use it means that you literally generate errors in the application. C# and JS code should not contain errors. It should communicate with a user in a regular way. 

Eugene Podkovka,

Hi Eugene, so the idea of sharing an EntityCollection created by ESQ on a script task using process parameters is not supported. correct?

I can put all the code inside a single script task but it will make it too big, the idea is to have different subprocess applying different filters.

Is there any other way to share at least a list of Ids between processes? I don't need a full entity only the ids are enough.

Eugene Podkovka,

Thank you for the answer, the throws new Exceptions are there to verify that the data is correct. I don't want the process running if it has missing information. 

How else can i leave the error on the process log?

Luciano De Munno,

I can't say that it's not supported, but it will be hard to do. The reason is that it's incorrect to split a single c# functionality between different business processes.

Just write correct c# code. Use different methods or even different classes. Create your own logging that will track all possible exceptions. This is the general way of good clean coding. 

Eugene Podkovka,

So, short answer is not supported.

The idea is to make a quick simple process to filter a list using what's already provided by bpm.

 

thank you for the answer

Show all comments
7.14_()
sales

Hi Guys ,

Please guide me, how to rename the main page (system ) display name ?

Secondly, How to add web page on the "About" section ?

---pfa--

 

Like 0

Like

1 comments

Dear Nikhil,

You can check the following article on how to integrate other web site within bpm'online.

https://academy.bpmonline.com/documents/technic-sdk/7-13/integration-third-party-sites-iframe

As for the section renaming, please open section wizard within needed section and change the title of section.

Regards,

Anastasia

Show all comments