Skip to Content
1
Mar 01, 2021 at 10:49 AM

Open Channel Integration - Campaign Header data

82 Views Last edit Mar 01, 2021 at 12:02 PM 5 rev

Hi,

I am trying to implement Open channel integration for call center operations.
As part of the payload i would like to transfer the Campain Priority as Header attributes in payload. I have implemented 3) Open Channel: Define Global Settings for Execution" and append the additional custom campaign parameter in "changing Table HEADER_ATTRIBUTES'.
Still i am not getting the Campaign Priority in Payload.

DATA: lv_campaign_id         TYPE cuan_initiative_id,
          ls_header_Attr         like line of HEADER_ATTRIBUTES,
          ls_campaign_root_api   TYPE cuan_s_campaign_root_api.

    package_size = 1000. " change the number of target group members processed in one package and transferred in the odata payload
    CHECK_PERMISSION = abap_false.

    read table HEADER_ATTRIBUTES assigning FIELD-SYMBOL(<fs_head>) WITH KEY param_name = 'CAMPAIGN'.
    if sy-subrc eq 0.
       lv_campaign_id = <fs_head>-param_value.
endif.

   ls_campaign_root_api = cl_cuan_campaign_helper_api=>campaign_root_read( EXPORTING iv_id = lv_campaign_id ).

 if ls_campaign_root_api-priority is NOT INITIAL.
    clear ls_header_attr.
    ls_header_attr-param_name = 'ZOC_EXPORT'.
    ls_header_attr-param_value = ls_campaign_root_api-priority.
    append ls_header_Attr to HEADER_ATTRIBUTES.
endif.

After implementing the above code i am still not getting the Priority in the payload.

{ "d": { "Campaign":
{ "CampaignId": "0000002233",
"Name": "Open Channel",
"MarketingAreaId": "IDP_IND",
"SegmentationObject": "SAP_CE_CONTACT_ENGAGEMENT",
"ImplementationId": "ZOC_EXPORT" }

Not sure where i am wrong in this.

Regards,

Bhaskar

Attachments