/
NUTRINTG Instant Messages

NUTRINTG Instant Messages




#StepDescription
1If RTM active
  • If CDS response is 200 check RTM_active param status (based on data in MongoDB dictionary - RTM_active)
  • if YES - pass the request to the RTM message creator
  • if NO - END
2Create RTM request
  • MongoDB contains a mapping of metadata and SFMC data (Event Definition Key, attributes)
  • List of attributes is the same for all third parties:
    • emailAddress
    • firstName
    • lastName
    • PhoneNumber
    • AccountSourceCode
  • Example mapping: 
  • Data are transformed to create relevant RTM request
  • Example RTM attributes:
    Example request
    [
        {
            "attributes": [
                {
                    "attributeName": "individualId",
                    "attributeType": "String",
                    "attributeValue": "3000003952033"
                },
                {
                    "attributeName": "emailAddress",
                    "attributeType": "String",
                    "attributeValue": "John@doe.com"
                },
                {
                    "attributeName": "firstName",
                    "attributeType": "String",
                    "attributeValue": "John"
                },
                {
                    "attributeName": "lastName",
                    "attributeType": "String",
                    "attributeValue": "Doe"
                },
                {
                    "attributeName": "cid",
                    "attributeType": "String",
                    "attributeValue": "DE100021651651"
                },
                {
                    "attributeName": "treatmentCode",
                    "attributeType": "String",
                    "attributeValue": "ABC1123XYZ"
                },
                {
                    "attributeName": "profileId",
                    "attributeType": "String",
                    "attributeValue": "efa9edb1-dcac-4323-a882-89b36cd1d8cd"
                },
                {
                    "attributeName": "accountSourceCode",
                    "attributeType": "String",
                    "attributeValue": "USAGWTUSC"
                },
                {
                    "attributeName": "dataSourceCode",
                    "attributeType": "String",
                    "attributeValue": "USAGWTUSC"
                },
                {
                    "attributeName": "brandOrgCode/ProgramCode",
                    "attributeType": "String",
                    "attributeValue": "MJNUSAC"
                },
                {
                    "attributeName": "created",
                    "attributeType": "String",
                    "attributeValue": "01/20/2019 12:00"
                }
            ],
            "emailAddress": "John@doe.com",
            "customerKey": "3000003952033"
        }
    ]
3RTM is sent to the Journey
  • MW send a request to the relevant "Event Definition Key"  ("Event Definition Key" taken from MongoDB)
  • Event Definition Key for test purposes: APIEvent-4b6fd87d-cef9-4e0d-f802-cadff42bb637
  • example request:

    example erquest
    Host:
    https://mc1plnsfxggrfg-l69pj913rd1x4.rest.marketingcloudapis.com/interaction/v1/events
    
     
    Headers:
    Authorization: Bearer #[flowVars.accessToken]
    
     
    Body:
        "ContactKey": flowVars.message.individualId,
        "EventDefinitionKey": flowVars.sfEventId.eventId,
        "Data": {
            "Individual_ID": flowVars.message.individualId,
            "encryptedEmailAddress": flowVars.message.encryptedEmailAddress,
            "firstName": flowVars.message.firstName,
            "lastName": flowVars.message.lastName,
            "cid": flowVars.message.cid,
            "treatmentCode": flowVars.message.treatmentCode,
            "profileId": flowVars.message.profileId,
            "accountSourceCode": flowVars.message.accountSourceCode,
            "dataSourceCode": flowVars.message.dataSourceCode,
            "brandOrgCode": flowVars.message.brandOrgCode,
            "created": flowVars.message.created,
            "emailAddress": flowVars.message.emailAddress,
            "customerKey": flowVars.message.customerKey
    		}
4Log RTM message
  • Log RTM message:
    • time
    • content
    • Event Definition Key
5Journey in SFMC
  • "Event Definition Key" is the Journey beginning event