* +-------------------------------------------------------------------------------------------------+
* | Method GET_CONTENT_ID
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_EXEC_HASH TYPE /BOBF/CONF_KEY
* | [<-()] RV_CONTENT_ID TYPE CUAN_ME_ENGAGEMENT_ID
* +-------------------------------------------------------------------------------------------------+
METHOD GET_CONTENT_ID.
DATA:
lt_key TYPE /bobf/t_frw_key,
lt_action_parameter TYPE cuan_t_marketing_orc_act_par.
DATA(lo_srv_mktorc) = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( iv_bo_key = if_cuan_marketing_orch_c=>sc_bo_key ).
APPEND VALUE #( key = iv_exec_hash ) TO lt_key.
lo_srv_mktorc->retrieve_by_association(
EXPORTING
iv_node_key = if_cuan_marketing_orch_c=>sc_node-execution_run
iv_association = if_cuan_marketing_orch_c=>sc_association-execution_run-to_parent
it_key = lt_key
IMPORTING
et_target_key = DATA(lt_action_key) ).
lo_srv_mktorc->retrieve_by_association(
EXPORTING
iv_node_key = if_cuan_marketing_orch_c=>sc_node-action
iv_association = if_cuan_marketing_orch_c=>sc_association-action-action_parameter
it_key = lt_action_key
iv_fill_data = abap_true
IMPORTING
et_data = lt_action_parameter ).
* read content ID from action parameter
READ TABLE lt_action_parameter ASSIGNING FIELD-SYMBOL(<ls_action_parameter>)
WITH KEY parameter_id = if_cuan_mkt_orch_constants=>sc_action_parameter_id-email_template_id.
IF sy-subrc IS INITIAL.
rv_content_id = <ls_action_parameter>-parameter_value.
ENDIF.
ENDMETHOD.
* +-------------------------------------------------------------------------------------------------+
* | GET_HTML_CONTENT
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_EXEC_HASH TYPE CUAN_MKT_EXEC_HASH
* | [--->] IV_CONTENT_ID TYPE CUAN_ME_ENGAGEMENT_ID
* | [--->] IT_PLACEHOLDERS TYPE CUAN_T_ME_DYNAMIC_CONTENT
* | [<-()] RV_HTML TYPE STRING
* +-------------------------------------------------------------------------------------------------+
METHOD get_html_content.
DATA lo_email_handler TYPE REF TO cl_cuan_mkt_exec_email.
DATA lt_parameters TYPE cuan_t_mkt_exec_param.
DATA lr_dynamic_content TYPE REF TO cuan_t_me_dynamic_content.
DATA lt_outbounds TYPE cuan_t_mkt_exec_pers_content.
DATA ls_outbound TYPE cuan_s_mkt_exec_pers_content.
DATA lv_path TYPE string.
TRY.
CREATE OBJECT lo_email_handler TYPE cl_cuan_mkt_exec_email_amzn EXPORTING it_parameters = lt_parameters.
CATCH cx_root.
MESSAGE e012(cuan_mkt_exec_frw) INTO DATA(lv_message) WITH 'CL_CUAN_MKT_EXEC_EMAIL_AMZN'.
RETURN.
ENDTRY.
CREATE DATA lr_dynamic_content.
lr_dynamic_content->* = it_placeholders.
ls_outbound-dynamic_content = lr_dynamic_content.
ls_outbound-email_message_ref = lo_email_handler.
ls_outbound-personalization_hash = iv_exec_hash.
APPEND ls_outbound TO lt_outbounds.
lv_path = me->get_tracking_path( ).
cl_cuan_a_me_personalize=>convert_message( EXPORTING iv_campaign_content_id = iv_content_id
iv_host = lv_path
CHANGING ct_contacts = lt_outbounds ).
rv_html = lo_email_handler->if_cuan_mkt_exec_email~get_body_html( ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
8 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |