cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Is it possible to create new promotion via external source ( file)? For Ex :my file will contain products && conditions to be added to a promotion.

Former Member
0 Likes
329

IN PromotionSourceRule,conditions are represented in JSON. For an assumption,If at all, I consume a file (containing new products/conditions to be added to a new promotion) from external source , I will clone the relevant template and manipulate the JSON (conditions in PromotionSourceRuleModel), which is not appropriate solution.I would rather manipulate the condition data in database but I also found we are not persisting the conditions data separately in DB.

Basically,we want to have the flexibility of creating promotions with extensive data via external source - and not relying on creating promotions manually via backoffice.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Raghavenda,

It may be convenient for your business managers to use hot folders - directories that are associated with predefined impexes and are processing CSV files that are put in them. This solution would work for them as long as they don’t try to create new types of promotions as this would require more programming work to define a new type. Tip: Hot folders accept CSV files without column names, process files periodically and for a file to be processed it is important for it to have a unique name - all files that were processed are placed in ‘archived’ or ‘error’ subfolder. If file lands in an error folder - rows are commented with a type of error.

See lessons: Creating hot folders: https://wiki.hybris.com/pages/viewpage.action?pageId=294094383

Best Regards,